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

RE: value-of select="" on source XML while using apply

Subject: RE: value-of select="" on source XML while using apply-templates in a variable
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 28 Jun 2004 17:02:36 +0100
value of select
> 
> I have a varible which I iterate using apply-templates.
> If I want t select an value from the source XML file, using
> value-of select="//XMLDOCUMENT/ELEMENT"
> I get nothing back.
> While not applying templates inside an variable, I always 
> have full access
> to the XML file data.
> 
> Does anybody has an idea how to solve this problem?
> 
Yes, anyone who's lurked on the list for more than a few days knows this
one: declare a global variable <xsl:variable name="root" select="/"/>, and
change your path expression to $root//XMLDOCUMENT/ELEMENT.

Incidentally, names beginning "XML" are reserved for future standardisation
(and in any case, calling something that isn't an XML document "XMLDOCUMENT"
seems designed to confuse the reader...).

Michael Kay


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.