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

Re: <no subject>

Subject: Re: <no subject>
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Tue, 06 Nov 2001 12:56:24 +0000
Re:  <no subject>
Klaus Weitzer  wrote:

>...the problem is: if i use xsl:variable select="document(/R/L/@uri)"
>everything is ok as long as @uri is set. IE crashes if you use
>document() with an empty parameter.
>
I think you mean that if /R/L/@uri evaluates to an empty node set,
xsl:variable select="document(/R/L/@uri)" causes IE to crash?  That
sounds like a bug to me, I think it should simply return an empty node
set.

>I think that setting a variable via the content = result tree fragment
>should be something like <xsl:copy-of select="document(/R/L/@uri)"/>
>but it doesn't work.
>
That should work, with one caveat: remember that
count(node-set($refxml)) will *always* be 1, regardless of how many
input documents you have.

Your original attempt will give you a node set containing a root node
for each document (two in the example you gave).  Because the copy-of
doesn't copy the root nodes returned by the document call, you will
get (after calling node-set($refxml)) a node set with *one* root node
whose children are all the top level nodes from the documents read.
Maybe this is tripping you up later?

Also the 'otherwise' might as well be empty: you cannot stop the root
node for the result tree being created by doing anything here with
empty node-set. Note, <xsl:value-of select="/.." /> gives you a text
node containing an empty string.  You 'copy' an empty node set by
doing nothing!

Regards,
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

 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.