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

Re: Cannot use result tree fragment

Subject: Re: Cannot use result tree fragment
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 18 Jun 2003 17:36:51 +0100
cannot use result tree fragment
This is a FAQ
If you use xsl:variable with content it generates a result tree
fragment, you can not query into that, all you can do is copy it with
copy-of to the result, or use it as a string.

Most XSLT systems have a node-set extension function to generate a node
set from a result tree fragment.

In your case though your result tree fragment would still not work as it
does not have the nodes of the documents only there character data as

<xsl:value-of
select="document(

xsl:value-of _always_ returns a string.

You can solve both these pronlems and avoid teh need for a node-set
extension function by going

<xsl:variable name="vchapmod1"
 select="document(concat(string($vchapmod/attribute::docref),'.xml'))"/>

so now vchapmod1 contains the document nodes directly.

You don't need the $vchapmod variable at all that is just the current
node so this can be written


<xsl:variable name="vchapmod1"
 select="document(concat(@docref,'.xml'))"/>

If you only use this variable in one place you don't need a variable at
all and could just have


<xsl:for-each select="document(concat(@docref,'.xml')//ht">


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.