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

RE: getting the text nodes from a set of attribute nod

Subject: RE: getting the text nodes from a set of attribute nodes
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Thu, 4 Sep 2003 17:27:23 +0100
getting nod attribut
You seem to be under the impression that attribute nodes own text nodes.
They don't.

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Robert P. J. Day
> Sent: 04 September 2003 16:15
> To: XSL List
> Subject:  getting the text nodes from a set of attribute nodes
> 
> 
> 
>   i have the following XML:
> 
>   <a>
>    <b attr='whatever' ... </b>
>    <b attr='more' ... </b>
>    <b attr='yadda yadda' ... </b>
>   </a>
> 
> and i'd like to use another template to process the (string) 
> values of the (set of) "attr" attributes.
> 
>   if i'm already processing the <a> element, i can certainly 
> create a node-set of the appropriate attribute nodes with:
> 
>  <xsl:variable name="set" select="b/@attr"/>
> 
> that will give me a node-set of attribute nodes and, when i 
> pass these to another template, that template will be 
> responsible for taking the string value of each attribute 
> node to do further 
> processing.
> 
>   on the other hand, would it be any faster or more elegant 
> to use an expression to create a node-set of text nodes 
> corresponding to those attribute values right off the bat so 
> that all i'm passing is a set of text nodes?
> 
>   that is, is there an expression that would, in that above 
> xsl:variable template, produce the node set of text nodes i'm 
> after in a single select?  and do people have strong opinions 
> either way in terms of aesthetics?
> 
> rday
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.