[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL-FO & Selecting Attributes
Thanks David,
Please bear with me, I'm finding it difficult to apply your logic. I'd like to try and explain myself a little clearer. Could you ammend my code, run a test and forward on the solution? I am using FOP. My "page-sequence" is as follows: <fo:page-sequence master-reference="page1"> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates select="publications/Item"/> </fo:flow> </fo:page-sequence> Here's my XML document: <publications> <header> <heading>Paragraph Header</heading> <para1>Para 1 text</para1> <para2>Para 2 text</para2> </header> <Item Sector="Agriculture" response="no"> <name>Poor Farmers Relief Fund</name> <description>A Consultation on ...</description> <publishDate>05.01.04</publishDate> <closingDate>20.02.04</closingDate> <urnNumber>04/1245</urnNumber> <image>image.jpg</image> </Item> </publications> My XSL-FO code is follows: <xsl:template match="Item/*"> <fo:block> <xsl:value-of select="@Sector"/> </fo:block> </xsl:template> <xsl:template match="Item/*"> <fo:block> <xsl:value-of select="name"/> </fo:block> </xsl:template> <xsl:template match="Item/*"> <fo:block> <xsl:value-of select="description"/> </fo:block> </xsl:template> <xsl:template match="Item/*"> <fo:block> <xsl:value-of select="publishDate"/> </fo:block> </xsl:template> <xsl:template match="Item/*"> <fo:block> <xsl:value-of select="closingDate"/> </fo:block> </xsl:template> <xsl:template match="Item/*"> <fo:block> <xsl:value-of select="urnNumber"/> </fo:block> </xsl:template> <xsl:template match="Item/image"> <fo:block> <fo:external-graphic src='url("{.}")'/> </fo:block> </xsl:template> I need the following result: <block>Agriculture</block> <block>Poor Farmers Relief Fund</block> <block>A Consultation on ..</block> <block>05.01.04</block> <block>20.02.04</block> <block>04/1245</block> <block>image</block> At the moment nothing is working except the transformation of the "Sector" attribute. Thanks, Craig Webber. _________________________________________________________________ Find a date, consult a directory and win prizes - only on MSN South Africa! http://www.msn.co.za/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|