[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL-FO & Selecting Attributes

Subject: Re: XSL-FO & Selecting Attributes
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Wed, 20 Apr 2005 12:17:09 -0500
jonathan gorman
I don't want to presume to speak for David, but I feel I should point
out that the "fixed" code has been posted twice now.  Of course, there
may be a delay on my end and it may not have made it to the list.  In
that case there will just be three instances of the fixed code.

Try this stylesheet:
<xsl:template match="Item">
<fo:block>
<xsl:value-of select="@Sector"/>
<xsl:apply-templates />
</fo:block>
</xsl:template>

<xsl:template match="Item/*">
<fo:block>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>

<xsl:template match="Item/image">
<fo:block>
<fo:external-graphic src="url({.})"/>
</fo:block>
</xsl:template>


I ran it and it produces the following output:


<fo:block>Agriculture
<fo:block>Poor Farmers Relief Fund</fo:block>
<fo:block>A Consultation on ...</fo:block>
<fo:block>05.01.04</fo:block>
<fo:block>20.02.04</fo:block>
<fo:block>04/1245</fo:block>
<fo:block><fo:external-graphic src="url(image.jpg)"/></fo:block>
</fo:block>

I have no idea what the rest of your stylesheet looks like, so I can't
comment if there is an error from another template that will let you
produce correct xsl-fo output (ie somethingl like
<xsl:template match="/">
<fo:root>
<xsl:apply-templates/>
</fo:root>
</xsL:template>

or set up namespaces properly ect.

How about posting the errors that you get?  We might be able to
identify the problem that is occurring.

Jon Gorman

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.