[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
hi
this is my first (xslt-beginner) question to this list, hoping my question is not been answered 1 mio times. i was searching in the archive to avoid this. :-)
i'm looking for a function that helps me to read and process several .xml files by document(). the problem is that when i say
document('nextfile.xml')
the document() function tries to read the xml file in the path of the current xslt (!) file. and that's not working for me. so i want to redirect the document() function to the path of the directory of the current .xml file.
how can i do that?
document-uri(/)
reports the whole (!) uri of the current xml file. that includes the path i'm looking for, like
file:/C:/somewhere/anywhere/whereami/myfile.xml
and that's fine. but how can i now cut off 'myfile.xml' when 'myfile.xml' is always changing and i have no idea of this filename in the xslt and replace it with 'nexfile.xml'?
i thought to find a function to
get the current xml file name
to be able to extract that file from the uri-path-string. but i could not find anything about this. also trying to find a function to find the last '/' in a string and extracting from that with substring-after (). uahh.
i hope to find help here. any hint is very appreciated!
[xsl] get the current xml file name
Subject: [xsl] get the current xml file name From: Frank Marent <frank.marent@xxxxxxxxxxx> Date: Tue, 8 Aug 2006 08:18:37 +0200 |
hi
this is my first (xslt-beginner) question to this list, hoping my question is not been answered 1 mio times. i was searching in the archive to avoid this. :-)
i'm looking for a function that helps me to read and process several .xml files by document(). the problem is that when i say
document('nextfile.xml')
the document() function tries to read the xml file in the path of the current xslt (!) file. and that's not working for me. so i want to redirect the document() function to the path of the directory of the current .xml file.
how can i do that?
document-uri(/)
reports the whole (!) uri of the current xml file. that includes the path i'm looking for, like
file:/C:/somewhere/anywhere/whereami/myfile.xml
and that's fine. but how can i now cut off 'myfile.xml' when 'myfile.xml' is always changing and i have no idea of this filename in the xslt and replace it with 'nexfile.xml'?
i thought to find a function to
get the current xml file name
to be able to extract that file from the uri-path-string. but i could not find anything about this. also trying to find a function to find the last '/' in a string and extracting from that with substring-after (). uahh.
i hope to find help here. any hint is very appreciated!
from switzerland frank
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Dublicate attribute to se, Joe Fawcett | Thread | RE: [xsl] get the current xml file , Colin Adams |
Re: [xsl] Use of separator, David Carlisle | Date | RE: [xsl] get the current xml file , Colin Adams |
Month |