Alexios Giotis <alex.giotis <at> gmail.com> writes:

> 
> Hi Simone,
> 
> What you are writing below is not XSLT, it is XSL:FO. One usage of XSLT is 
to create an XSL:FO based on the XML
> data that you have. And this should be exactly what you need. The links 
written by Peter are a good starting
> point. 
> 
> Alexios Giotis
> 
> On Mar 22, 2012, at 1:17 PM, Simone wrote:
> 
> > Hi, Peter. Thanks for your reply.
> > I am already applyng an XSLT transformation using FOP and its Tag Logical 
> > Element (TLE) Extension.
> > As in http://xmlgraphics.apache.org/fop/1.0/output.html#afp-tag-logical-
> > element, I declared the appropriate namespace in the fo:root element like 
this:
> > 
> >      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";
> >               xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp";>
> > 
> > then set in XSLT something like
> > 
> > <fo:page-sequence master-reference="simple">
> >        <afp:tag-logical-element name="foo" value="bar"/>
> >        <fo:flow flow-name="xsl-region-body">
> > 
> > and it works.
> > 
> > The problem is that I have to create dynamic TLE values based on XML data 
and 
> > was looking for a suggestion to accomplish this since anything I tried did 
not 
> > work.
> 
As Pascal Sancho advised me, to better understand here is the starting snippet 
from my XSLT-FO until <afp:tag-logical-element name="Job" value="@Job"/>.
If anyone interested in, I can sent the entire XSLT-FO and an example of XML 
to transform. Regards.

<?xml version="1.0" encoding="utf-8"?>
<!--Designed and generated by Altova StyleVision Enterprise Edition 2012 rel. 
2 - see http://www.altova.com/stylevision for more information.-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:altova="http://www.altova.com"; 
xmlns:altovaext="http://www.altova.com/xslt-extensions"; 
xmlns:clitype="clitype" xmlns:fn="http://www.w3.org/2005/xpath-functions"; 
xmlns:iso4217="http://www.xbrl.org/2003/iso4217"; 
xmlns:ix="http://www.xbrl.org/2008/inlineXBRL"; xmlns:java="java" 
xmlns:link="http://www.xbrl.org/2003/linkbase"; 
xmlns:sps="http://www.altova.com/StyleVision/user-xpath-functions"; 
xmlns:xbrldi="http://xbrl.org/2006/xbrldi"; 
xmlns:xbrli="http://www.xbrl.org/2003/instance"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:svg="http://www.w3.org/2000/svg"; 
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp"; exclude-result-
prefixes="altova altovaext clitype fn iso4217 ix java link sps xbrldi xbrli 
xlink xs xsi">
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no" />
  <xsl:param name="SV_OutputFormat" select="'PDF'" />
  <xsl:variable name="XML" select="/" />
  <xsl:variable name="fo:layout-master-set">
    <fo:layout-master-set>
      <fo:simple-page-master master-name="page-master-185618136-even" margin-
left="10mm" margin-right="10mm" page-height="297mm" page-width="210mm" margin-
top="10mm" margin-bottom="10mm">
        <fo:region-body margin-top="0mm" margin-bottom="0mm" column-count="1" 
column-gap="10mm" />
      </fo:simple-page-master>
      <fo:simple-page-master master-name="page-master-185618136-odd" margin-
left="10mm" margin-right="10mm" page-height="297mm" page-width="210mm" margin-
top="10mm" margin-bottom="10mm">
        <fo:region-body margin-top="0mm" margin-bottom="0mm" column-count="1" 
column-gap="10mm" />
      </fo:simple-page-master>
      <fo:page-sequence-master master-name="page-master-185618136">
        <fo:repeatable-page-master-alternatives>
          <fo:conditional-page-master-reference master-reference="page-master-
185618136-even" odd-or-even="even" />
          <fo:conditional-page-master-reference master-reference="page-master-
185618136-odd" odd-or-even="odd" />
        </fo:repeatable-page-master-alternatives>
      </fo:page-sequence-master>
    </fo:layout-master-set>
  </xsl:variable>
  <xsl:variable name="altova:nPxPerIn" select="96" />
  <xsl:template match="/">
    <fo:root>
      <xsl:copy-of select="$fo:layout-master-set" />
      <fo:declarations>
        <x:xmpmeta xmlns:x="adobe:ns:meta/">
          <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
            <rdf:Description rdf:about="" 
xmlns:dc="http://purl.org/dc/elements/1.1/";>
              <dc:title>
                <xsl:value-of select="Job/@Job" />
              </dc:title>
              <dc:creator>
                <xsl:value-of select="Job/@Customer" />
              </dc:creator>
              <dc:description>
                <xsl:value-of select="Job/@Batch" />
              </dc:description>
            </rdf:Description>
            <rdf:Description rdf:about="" 
xmlns:pdf="http://ns.adobe.com/pdf/1.3/";>
              <pdf:Keywords>
                <xsl:value-of select="Job/@InsertingKit" />
              </pdf:Keywords>
            </rdf:Description>
            <rdf:Description rdf:about="" 
xmlns:xmp="http://ns.adobe.com/xap/1.0/";>
              <xmp:CreatorTool>Altova StyleVision Enterprise Edition 2012 rel. 
2 (http://www.altova.com)</xmp:CreatorTool>
            </rdf:Description>
          </rdf:RDF>
        </x:xmpmeta>
      </fo:declarations>
      <fo:page-sequence force-page-count="no-force" master-reference="page-
master-185618136" initial-page-number="auto" format="1">
      <afp:tag-logical-element name="Job" value="@Job"/>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to