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

Re: after use of document(): selecting parts of the ob

Subject: Re: after use of document(): selecting parts of the obtainednode-set
From: Chuck White <chuckwh@xxxxxxxxxxx>
Date: Thu, 11 Apr 2002 15:27:54 -0700
document.selecting
Could be a couple things. One, it should be:
document('itn.xml')

Note the single quotes.
Without the quotes, the XSLT processor thinks your argument is a node-set,
not a string value of the resource.

And logo is a child of itn, so it should be:

<xsl:apply-templates select="$itn/itn/logo" />

best regards,

Charles White
The Tumeric Partnership
http://www.tumeric.net
chuck@xxxxxxxxxxx
________________________________________
Author, Mastering XSLT
Sybex Books, May, 2002

Co-Author, Mastering XML, Premium Edition
Sybex Books, May, 2001
http://www.javertising.com

----- Original Message -----
From: "Ralph Holz" <Ralph.Holz@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, April 11, 2002 3:04 PM
Subject:  after use of document(): selecting parts of the obtained
node-set


> Hi,
>
> first, thanks to all the people who helped me with my problems the last
few
> days!
>
> Unfortunately, I've got a new one:
>
> I use the document function to load a document from within a stylesheet,
> and store the resulting nodeset in a variable:
>
> <xsl:variable name="itn" select="document(itn.xml)" />
>
> I believe this works. The variable is top-level, by the way.
>
> The document itn.xml has the following structure:
>
> <itn>
> <logo>
> some child elements
> </logo>
>
> <menu>
> some child element
> </menu>
> </itn>
>
> Now I'd like to access certain parts of this nodeset, like this:
>
> <xsl:template>
>
> ...
>
> <xsl:apply-templates select="$itn/logo" />
>
> ...
>
> </xsl:template>
>
> and for the sub-nodeset $itn/logo I have the following template:
>
> <xsl:template match="itn/logo">
> extract data
> </xsl>
>
> Unfortunately, whenever I try this combination, the result of my
> <xsl:apply-templates select="$itn/logo"> is empty. The same is true when I
> do a select like <xsl:apply-templates select="$itn//logo">.
>
> Maybe I haven't understood the functionality of document() or how to
access
> parts of a node set that is returned by document()? Can someone help me,
> please?
>
> Thanks a lot,
> Ralph
>
>
>  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.