xsl-list
[Top] [All Lists]

[xsl] Document() question

2007-09-18 18:33:44
Suppose I have the following in test.xml:

<?xml version="1.0" encoding="UTF-8"?>
<items>
 <item>
   <refurl="/a/b/c/index.xml"/>
 </item>
</items>

I want to use the document() function to get the refurl and process that xml file:

<xsl:variable name="refurl">
 <xsl:value-of select="document('../../test.xml')/items/item/@refurl"/>
</xsl:variable>

Now, I want to process /a/b/c/index.xml:

<xsl:apply-templates select="document($refurl)"/>

I am not able to access the /a/b/c/index.xml file located off my website:
http://www.foobar.com/a/b/c/index.xml

I tried:

document(file:///a/b/c/index.xml)

*Warning*: XSLTProcessor::transformToXml() [function.XSLTProcessor-transformToXml <http://www.iqlicksoftcms.com/function.XSLTProcessor-transformToXml>]: I/O warning : failed to load external entity

document(file://a/b/c/index.xml)

*Warning*: XSLTProcessor::transformToXml() [function.XSLTProcessor-transformToXml <http://www.iqlicksoftcms.com/function.XSLTProcessor-transformToXml>]: remote host file access not supported

document(http://www.foobar.com/a/b/c/index.xml)

*Warning*: XSLTProcessor::transformToXml() [function.XSLTProcessor-transformToXml <http://www.iqlicksoftcms.com/function.XSLTProcessor-transformToXml>]: php_network_getaddresses: getaddrinfo failed:

Any suggestions?

--------------------------
Kerry Kobashi
Kobashi Computing


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>