Subject: [xsl] RE: Returning a Tree From: Darren Hayduk <dhayduk@xxxxxxxxxxxxxxx> Date: Thu, 6 Sep 2001 10:10:49 -0400 |
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: [xsl] 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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] RE: Returning A Tree, Jeni Tennison | Thread | [xsl] How do you change markup to t, Andrew Kane |
Re: [xsl] RE:what about [@this and , Jeni Tennison | Date | Re: [xsl] Question with xsl:copy-of, Jeni Tennison |
Month |