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

Re: XSLT merging XML documents

Subject: Re: XSLT merging XML documents
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Jul 2000 13:20:26 +0200 (MET DST)
saxon merge xml
> I had this problem too, I'm still fairly new but found that putting quotes
> around the forward slash in the calls to the document function works
> 
> document($file1,'/')/node()
> document($file2,'/')/node()
> document($with,'/')/node()

But that doesn't reflect the intended behaviour.
Using >>/<< means the root node of the input document.
Using >>'/'<< means the string '/'.

If stylesheet and XML source are at the same location (e.g. directory),
you can omit the second parameter at all.
A problem arises if the stylesheet is in another directory. In this
case the XSLT processor looks for $file1 in the stylesheet directory.
Strictly spoken: it uses the base URI of the stylesheet, whereas you
want the base URI of the input file to be applied. 
For this purpose you provide a node with the wanted base URI, for
example the root node. Changing >>/<< to >>/*<< gives the toplevel
element node and works as well.

Regards,
Oliver

BTW: I'll put a new version during the day on my web page [1].
     There's a bug contained which causes xt to fail (I didn't
     know why so far ...). The new version of Saxon (5.4) behaves
     like xt in this respect - that perplexed me a little bit ...
     
[1] http://www.informatik.hu-berlin.de/~obecker/XSLT/#merge    
     

/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 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.