Re: [xsl] Document function URI

Subject: Re: [xsl] Document function URI
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Tue, 14 Dec 2004 20:21:32 +0100
Hi,

(read below)

Antsnio Mota wrote:

Hi again.

This is from the W3C site:

"When the first argument to the document function is not a node-set, the first
argument is converted to a string as if by a call to the string function. This
string is treated as a URI reference; the resource identified by the URI is
retrieved. The data resulting from the retrieval action is parsed as an XML
document and a tree is constructed in accordance with the data model."

So, i can have something like

document('http://mysite/getxml.asp?param="xxx";')

if the asp return some well-formed XML, correct?

Yes, correct. You could test it first by referencing a static (well-formed) XML file on a web-server of ftp-server.


By the way, you might want to be carefull with the use of double quotes in your document argument. I don't believe they are necessary here, but if you do need them there, escape them in XML with &quot; or pass an encoded url with " substituted with %22

I'm convinced that it is, but since i don't have access in this phase to a asp
or servlet server, i prefer to ask before i proceed to the server side.

Thanks again.

Cheers...


Current Thread