[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Returning a Tree
Ahh... I knew about the result tree fragments, and I'm using Saxon, which automatically converts them to node sets. What threw me was even with the <copy-of> (which I had expected to return a RTF), count($B) was returning 1. Don't know why it didn't dawn on me to do count($B/B) or count($B/node())... Thanks!! Darren -----Original Message----- Date: Thu, 6 Sep 2001 10:51:26 +0200 (CEST) From: "Swen Thuemmler" <Swen.Thuemmler@xxxxxxxxxxxx> Subject: Re: RE: Returning A Tree [snip] But newer processors seemt to do the conversion themselves (in anticipation of the changes in XSL-1.1 (or 2.0), so with Saxon 6.4 I can also say: <xsl:for-each select="$B/B"> <xsl:value-of select="."/> <xsl:if test="not(position()=last())"> <xsl:text>,</xsl:text> </xsl:if> </xsl:for-each> --- and --- Date: Thu, 6 Sep 2001 09:59:19 +0100 From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Subject: Re: RE: Returning A Tree [snip] The reason, then, that you aren't getting the output that you expect is that you're counting and getting the value of the root nodes of these node trees, rather than the children of the root node. If you try: <xsl:for-each select="$A/node()">...</xsl:for-each> <xsl:for-each select="$B/node()">...</xsl:for-each> <xsl:value-of select="count($B/node())" /> then you will get the results that you are after. _______________________________________________ Darren Hayduk | Network Management Nauticus Networks, Inc. 200 Crossing Blvd, Framingham, MA 01702 508-270-0500 x299 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
|