[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Document() question

Subject: Re: Document() question
From: Steve <subsume@xxxxxxxxx>
Date: Tue, 18 Sep 2007 21:42:01 -0400
Re:  Document() question
Try <xsl:variable name="refurl" select="document('blahblah')/node/node/node />

As it stands, your variable doesn't end up becoming a node set, it
simply becomes the concatenated content of the nodes you're hoping to
select.

On 9/18/07, Kerry Kobashi <kkobashi@xxxxxxxxxxx> wrote:
> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.