W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2002

Question about XSLT

From: Eyrignoux Marc <eyrignou@yahoo.fr>
Date: Tue, 20 Aug 2002 15:17:18 +0200 (CEST)
Message-ID: <20020820131718.91083.qmail@web11205.mail.yahoo.com>
To: www-xsl-fo@w3.org

Hello everybody,

I have a question about XSLT.

I am using FOP for getting nice PDF documents, and FOA
for writing the XSL stylesheet.

I have 1 XML file for the static contents
(static.XML), and a dynamic XML stream containing, for
example, calculated amounts.

For my tests, I have written a static file containing
sample amounts. Therefore, my XSL file refers to both
the XML files, and everything works fine.

But I don't know if it is possible to refer my dynamic
stream from the XSL file ?

Here are the files:

Here is an example of the dynamic stream:
<?xml version="1.0"?>

Here is the static XML file:
<?xml version="1.0"?>
  <title>My bank</title>
  <paragraph>Your results on 
    <ext att="dtSimulation"/>

As you know, FOA gives styles to the XML tags: for
example, the tag <title> will be printed bold, etc...
However, I have parametered my XSL file for searching
in the dynamic stream when the tag <ext> is
The PDF file looks like:
     My bank (with title style)
Your results on 22/08/1976 (with paragraph style)

My problem lies in the last part of the XSL file:
This line refers to a file, but I want it to refer to
the XML stream I gave to Xalan.
I have tried to write <xsl:apply-templates
select="structureResultat/dtSimulation"/>, but Xalan
seems not to detect the XML stream, since 22/08/1976
does not appear in the PDF file.

Here is the XSL file generated by FOA:

  <xsl:import href="TablesAtts.xsl"></xsl:import>
  <xsl:output method="xml" encoding="UTF-8"
  <xsl:variable name="dots">l</xsl:variable>
  <xsl:variable name="circles">m</xsl:variable>
  <xsl:variable name="squares">n</xsl:variable>
  <xsl:strip-space elements="row"></xsl:strip-space>
  <xsl:template match="/">
        <fo:simple-page-master margin-left="1cm"
page-width="210mm" margin-right="1cm"
margin-bottom="3cm" margin-top="2cm"
master-name="myPage" page-height="297mm">
          <fo:region-body ></fo:region-body >
        <fo:page-sequence-master master-name="mySeq">
      <fo:page-sequence  master-reference="mySeq">
        <fo:flow  flow-name="xsl-region-body">
        </fo:flow >
      </fo:page-sequence >
  <xsl:template match="static/title" foa:name="titre"
foa:class="block" foa:group="paragraph">
    <fo:block foa:name="titre" foa:group="paragraph"
xsl:use-attribute-sets=" h1">
  <xsl:template match="static/paragraph"
foa:name="test" foa:class="block"
    <fo:block foa:name="test" foa:group="paragraph"
xsl:use-attribute-sets=" Normal">
foa:name="dtSimulation" foa:class="inline"
    <fo:inline foa:name="dtSimulation"
foa:group="emphasis" xsl:use-attribute-sets=" bold">

Thanks in advance,

PS: I am registered to the list, but you can also
answer to eyrignou@yahoo.fr

C'est au pied du mur qu'on voit le mieux le mur.

Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en franšais !
Yahoo! Mail : http://fr.mail.yahoo.com
Received on Tuesday, 20 August 2002 09:17:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:26 UTC