[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-c-users
Subject:    RE: document() and Xalan-C
From:       "Ross Ken" <Ken.Ross () iie ! qld ! gov ! au>
Date:       2002-12-10 0:15:54
[Download RAW message or body]

Thanks it's marvellous what a difference an extra / makes

Ken R.

-----Original Message-----
From: David N Bertoni/Cambridge/IBM [mailto:david_n_bertoni@us.ibm.com]
Sent: Tuesday, 10 December 2002 10:00 AM
To: xalan-c-users@xml.apache.org
Subject: RE: document() and Xalan-C


Hi Ken,

Please make sure you reply to the list, not just to me.

The proper format for an absolute file URL is:

   file:///foo/temp/file.xml

If you don't want to store the protocol with the directory, then you can do
this:

   document(concat('file://', $WKDIR, '/temp/file.xml'))

If that doesn't work, there may be a bug.

Dave



                                                                                      \
                
                      "Ross Ken"                                                      \
                
                      <Ken.Ross@iie.ql         To:      "David N \
                Bertoni/Cambridge/IBM" <david_n_bertoni@us.ibm.com>                   \
                
                      d.gov.au>                cc:                                    \
                
                                               Subject: RE: document() and Xalan-C    \
                
                      12/09/2002 03:31                                                \
                
                      PM                                                              \
                
                                                                                      \




Thanks for the reply Dave.

Unfortunately "document(concat($WKDIR, '/', 'temp/file.xml'))" is exactly
what I was trying to do (and it didn't work).  I've tried $WKDIR specified
both as file://blah and the unix form of /blah.

Do you have a working example with an absolute path?

Ken R.


-----Original Message-----
From: David N Bertoni/Cambridge/IBM [mailto:david_n_bertoni@us.ibm.com]
Sent: Tuesday, 10 December 2002 9:24 AM
To: xalan-c-users@xml.apache.org
Subject: Re: document() and Xalan-C






Using the one argument form of the document() function, relative URIs use
the base URI of the stylesheet.  If you want an absolute path, use an
absolute path, or use the two argument form of the document() function to
provide the base URI for your relative URI.

You could also try:

   document('../temp/file.xml')

Or, if $WKDIR is a variable in your stylesheet, you could do something
like:

   document(concat($WKDIR, '/', 'temp/file.xml'))

Dave




                      "Ross Ken"

                      <Ken.Ross@iie.ql         To:
<xalan-c-users@xml.apache.org>

                      d.gov.au>                cc:      (bcc: David N
Bertoni/Cambridge/IBM)
                                               Subject: document() and
Xalan-C
                      12/09/2002 02:58

                      PM





Hi Folks,

I was wondering whether anyone knew how to specify an absolute document
path in an XSLT for the document() function for the Xalan processor?

Relative paths further down the tree from the XSLT seem fine. eg if the
XSLT is in $WKDIR/project then you can access $WKDIR/project/temp ( by
using document('temp/file.xml') ), but I can't get it to access
$WKDIR/temp.  I'm sure I have to be doing something stupid, but I can't see
it.

Any help greatly appreciated,

Ken R.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic