Absolute Path in Document() in a xsl

S

schaf

Hello !
Im trying to access some XML Document by an absolute path with
document() in my XSL-File.

It looks like this:
<xsl:param name="pData" as="xs:anyURI"/>
<xsl:param name="sData" as="xs:anyURI"/>

<xsl:variable name="person-ref" select="document($pData)/daten"/>
<xsl:variable name="study-ref"
select="document($sData)/studienArten"/>

But if I use an absolute Path as Parameter, it does not work. I tried
this:

E:\sws\Studienprojekt\XML_Files\studyDefinitions.xml

Could you help me ???

Thanks
 
M

Martin Honnen

schaf wrote:

Im trying to access some XML Document by an absolute path with
document() in my XSL-File.

It looks like this:
<xsl:param name="pData" as="xs:anyURI"/>
<xsl:param name="sData" as="xs:anyURI"/>

<xsl:variable name="person-ref" select="document($pData)/daten"/>
<xsl:variable name="study-ref"
select="document($sData)/studienArten"/>

But if I use an absolute Path as Parameter, it does not work. I tried
this:

E:\sws\Studienprojekt\XML_Files\studyDefinitions.xml

That is not a URL, as a URL you need
file:///E:\sws\Studienprojekt\XML_Files\studyDefinitions.xml
 
R

Richard Tobin

E:\sws\Studienprojekt\XML_Files\studyDefinitions.xml

That is not a URL, as a URL you need
file:///E:\sws\Studienprojekt\XML_Files\studyDefinitions.xml[/QUOTE]

That's still not much of a URL. Use forward slashes throughout.

-- Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top