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

Re: XSLT V 1.1

Subject: Re: XSLT V 1.1
From: Paul Tchistopolskii <paul@xxxxxxx>
Date: Tue, 12 Sep 2000 03:12:53 -0700
copy xslt
----- Original Message -----
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>

> > > > 4. document() should accept only URI.
> > >
> > > The two-argument version of document( "where", /) allows me to use an XSL file on a
web
> > server, and still include files from the same directory as the original XML-file.
> >
> > I don't understand what is your rationale.  Could you please
> > provide the XSL ? In return I'l try to provide the invariant which
> > will work without document() with 2 prameters.
>
> May I step in?
> The following XSLT is available on
> http://www.informatik.hu-berlin.de/~obecker/copy.xslt
>
> <?xml version="1.0" encoding="iso-8859-1"?>
>
> <xslt:transform xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
>                 version="1.0">
>
> <xslt:param name="input" />
>
> <xslt:template match="/">
>    <xslt:copy-of select="document($input,.)" />
> </xslt:template>
>
> </xslt:transform>
>
> It takes a file name as parameter and outputs (copies) its contents.
> So you can invoke saxon (e.g.) like this:
>
> saxon anything.xml http://www.informatik.hu-berlin.de/~obecker/copy.xslt
input=myfile.xml
>
> myfile.xml and anything.xml are in the same directory.
>
> How would you solve this without the second parameter of document() ?

I think  this should be a default behavior of document( URI ).

XSLT engine knows what is the system id of anything.xml, so it
should resolve the document(URI)  taking into account the
system id of anything.xml ( not the system id of xsl stylesheet ).

It should use system id of xsl stylesheet when resolving
xsl:include or  xsl:import, not when resolving document().

Or  I still don't understand what do you mean ( could be ).

Rgds.Paul.



 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.