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

Re: Need to fill in number of output nodes...

Subject: Re: Need to fill in number of output nodes...
From: Steve Freeman <smfreeman@xxxxxxxxxxx>
Date: Thu, 11 Sep 2003 10:09:13 -0400
fill in number
Thanks Michael. Unfortunately, I can't cheat so I'm limited to (b).

Steve

Michael Kay wrote the following on 9/11/2003 9:41 AM:

<doc>
   <header>
       ...
   </header>
   <body>
       <data>
           <elem1/> <!-- actual names vary -->
           <elem2/>
       </data>
       <summary dataCount="2"/>
   </body>
</doc>


The number of elements within <data> is variable. I need to calculate the dataCount attribute from the number of <data> elements. What is a good solution for this? I'd rather not use a second transform step unless absolutely necessary.



Three solutions:


(a) go back to the input document and calculate the information from
that
(b) a two-stage transformation
(c) cheat, by using saxon:assign or similar.

I would go for (b).

Michael Kay





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.