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

RE: Returning a Tree

Subject: RE: Returning a Tree
From: Darren Hayduk <dhayduk@xxxxxxxxxxxxxxx>
Date: Thu, 6 Sep 2001 10:10:49 -0400
hayduk
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


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.