Skip to topic | Skip to bottom
Home

Tesi
Tesi.TallMergerr1.3 - 07 Jun 2007 - 18:12 - LucaFurinitopic end

Start of topic | Skip to actions
Un esempio di template, non troppo ragionato:

<tall:template>
<tall:group width="297mm" height="210mm">
   <tall:group layout="star" proximity="close" similarity="width color">
      <tall:object shape="rect"/>
      <tall:object shape="circle"/>
      <tall:object source="//p[@class='offer']" priority="low">
       <fo:block>
         <fo:inline font-size="10" tall:source="span[@class='desc']"></fo:inline>
         <fo:inline font-size="10" tall:source="span[@class='price']"></fo:inline>
       </fo:block>      
      </tall:object>
      <tall:object source="//p[@class='specialoffer']" priority="high">
       <svg:circle>
         <svg:text tall:source="span[@class='desc'"></svg:text>
       </svg:circle>
      </tall:object>
   </tall:group>
</tall:group>
</tall:template>

Il file di input e':

<iml>
   <p class="offer"><span class="desc">Generic offer #1 </span><span class="price">9.99</span></p>
   <p class="offer"><span class="desc">Generic offer #2 </span><span class="price">4.98</span></p>
   <p class="offer"><span class="desc">Generic offer #3 </span><span class="price">19.99</span></p>
   <p class="offer"><span class="desc">Generic offer #4 </span><span class="price">99.99</span></p>
   <p class="specialoffer">
      <span class="desc">Text of special offer #1</span>
      <span class="price">2.49</span>
      <img href="oggetto.gif"/>
   </p>
   <p class="specialoffer">
      <span class="desc">Text of special offer #1</span>
      <span class="price">24.99</span>
      <img href="altrooggetto.jpg"/>
   </p>
</iml>

Questo potrebbe essere il risultato dell'applicazione del template al file dei contenuti:

<tall:group width="297mm" height="210mm">
   <tall:group layout="star" proximity="close" similarity="width color">
      <tall:object shape="rect"/>
      <tall:object shape="circle"/>
      <tall:object priority="low">
       <fo:block>
         <fo:inline font-size="10">Generic offer #1 </fo:inline>
         <fo:inline font-size="10">9.99</fo:inline>
       </fo:block>      
      </tall:object>
      <tall:object priority="low">
       <fo:block>
         <fo:inline font-size="10">Generic offer #2 </fo:inline>
         <fo:inline font-size="10">9.99</fo:inline>
       </fo:block>      
      </tall:object>
      <tall:object priority="low">
       <fo:block>
         <fo:inline font-size="10">Generic offer #3 </fo:inline>
         <fo:inline font-size="10">9.99</fo:inline>
       </fo:block>      
      </tall:object>
      <tall:object priority="low">
       <fo:block>
         <fo:inline font-size="10">Generic offer #4 </fo:inline>
         <fo:inline font-size="10">9.99</fo:inline>
       </fo:block>      
      </tall:object>
      <tall:object priority="high">
       <svg:circle>
         <svg:text>Text of special offer #1</svg:text>
       </svg:circle>
      </tall:object>
      <tall:object priority="high">
       <svg:circle>
         <svg:text>Text of special offer #2</svg:text>
       </svg:circle>
      </tall:object>
   </tall:group>
</tall:group>

E questi sono alcuni possibili output (simulati):

-- LucaFurini - 07 Jun 2007
to top


Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Fabio's Wiki? Send feedback