You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Rajkumar, Joseph" <ra...@orionsci.com> on 2001/02/27 18:55:33 UTC

Using document() in xalan-1.2.1

Hi
    I would like to know if the following command is correct. I think
it is, but it does not work.

   document('mini.xml','/subdir')

   I assume that this will give me access to the file "mini.xml" in the
directory called 'subdir' under the directory from which the original
xml file is loaded.

   Is this a bug, or have I misunderstood something.

Thanks
Joseph Rajkumar

PS: Kindly send an email, since I am not subscribed to the list. Thanks



Re: Using document() in xalan-1.2.1

Posted by James Melton <ja...@cylogix.com>.
As I understand things...

If the first argument to document() is a string, then it is evaluated as
a URI. The second argument _must_ be a node-set. Your example won't work
because the second parameter is not a node-set. 

If you want to use a relative URI, try this:
  document('subdir/mini.xml') 

However, if this code is placed in an xsl file the URI will be resolved
relative to the location of the stylesheet and not relative to the xml
file being transformed. 

Jim.

"Rajkumar, Joseph" wrote:
> 
> Hi
>     I would like to know if the following command is correct. I think
> it is, but it does not work.
> 
>    document('mini.xml','/subdir')
> 
>    I assume that this will give me access to the file "mini.xml" in the
> directory called 'subdir' under the directory from which the original
> xml file is loaded.
> 
>    Is this a bug, or have I misunderstood something.
> 
> Thanks
> Joseph Rajkumar
> 
> PS: Kindly send an email, since I am not subscribed to the list. Thanks

-- 

____________________________________________________________
James Melton                 CyLogix
609.750.5190                 609.750.5100
james.melton@cylogix.com     www.cylogix.com