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

Re: JDK 1.4 <> 5.0 transformation compatibility

Subject: Re: JDK 1.4 <> 5.0 transformation compatibility
From: Kai Hackemesser <kaha@xxxxxx>
Date: Mon, 18 Jun 2007 15:26:17 +0200
Re:  JDK 1.4 <> 5.0 transformation compatibility
Hello,

I'm currently tracing down that error in xsltc transformation from last week. In the source below I marked two lines with ==> - the first one shows me how many nodes were selected before calling the template handleN. The result was > 0 in my tests and that was ok: handleN got a filtered list of N in $ns. The second comment didn't appear in the result. I placed a comment above the for-each, too, and the variable $ns still held a number of nodes. but the for-each sort returned without doing the requested work. If I remove the xsl:sort tags in in the for-each it works. So sorting is working wrong. Or do you see another problem? Keep in mind, this source did work with internal xalan in 1.4.2 and id also works with external xalan 2.7 in 1.5/1.6.

Kind regards,
Kai


I dived in using comments in the output to see, where I have what values.


   <xsl:key name="ADNCategory" match="AD/N"
       use="concat(generate-id(..) , string(Category))"/>

<xsl:template name="displayN">
<xsl:variable name="currentAD" select="."/>
<!-- Alle Categories durchgehen -->
<xsl:variable name="categories"
select="N[generate-id(.)= generate-id(key('ADNCategory', concat(generate-id($currentAD) , string(Category)))[1])]/Category"/>
<xsl:for-each select="$categories">
<xsl:variable name="category" select="."/>
<xsl:variable name="nPerCategory"
select="$currentAD/N[Category = $category]"/>
==> <xsl:comment>N selected: <xsl:value-of select="count($nPerCategory)"/></xsl:comment>
<xsl:call-template name="handleN">
<xsl:with-param name="ns" select="$nPerCategory"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>


<xsl:template name="handleN">
<xsl:param name="ns"/>
<tr>
<td colspan="2">
<xsl:for-each select="$ns">
<xsl:sort select="Year" data-type="number" order="descending"/>
<xsl:sort select="Number" data-type="number" order="descending"/>
==> <xsl:comment>current N: <xsl:value-of select="."/></xsl:comment>
<xsl:call-template name="nHeader"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</td>
</tr>
</xsl:template>


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.