|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: newbie - comparing attributes in nodes
At 2002-01-16 16:50 +0000, Hesselberth, Jan wrote:
I tried to follow the examples in the book and came up with variants as below but none work. Can someone please help? That code works for me using XT (see below) ... what are your results? (note that since you are looking at siblings, using preceding-sibling:: will check for fewer nodes than using preceding::). ............... Ken
T:\ftemp>type jan.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"><xsl:output indent="yes"/> <xsl:template match="/">
<fotable>
<xsl:for-each select="/Report/printCategory">
<xsl:if test="not(@ID=preceding::printCategory/@ID)">
<fo:table-row>
<fo:table-cell>
<fo:block>Print Category
<xsl:value-of select="@ID"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:if>
<fo:table-row>
<fo:table-cell>
<fo:block>
<xsl:value-of select="TranName"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fotable>
</xsl:template></xsl:stylesheet> T:\ftemp>xt jan.xml jan.xsl jan.fo T:\ftemp>type jan.fo
<?xml version="1.0" encoding="utf-8"?>
<fotable xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:table-row>
<fo:table-cell>
<fo:block>Print Category
20</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>FURTHER
ADVANCE</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>INITIAL
DRAWDOWN</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>RETENTION
RELEASE</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Print Category
21</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>INTEREST
ADJUSTMENT</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>INTEREST ADJUSTMENT
(CREDIT)</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>INTEREST
CHARGED</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>REDEMPTION INTEREST
CHARGED</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>Print Category
22</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>ARRANGEMENT
FEE</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>FIXED RATE BOOKING
FEE</fo:block>
</fo:table-cell>
</fo:table-row>
</fotable>
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) ISBN 0-13-065196-6 Definitive XSLT & XPath ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-07-1 Practical Formatting Using XSLFO XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed), articles, training(instructor-live,Internet-live,web/CD,licensed) Next public training: 2002-01-18,02-11,12,13,15,18,21, - 03-11,14,15,18,19,04-08,09,10,12,06-04,07 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








