Re: [xsl] Document() and &

Subject: Re: [xsl] Document() and &
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Fri, 17 May 2002 11:05:52 -0400
[Josh Beach]>

> I made a small sample piece of XSL that I have proven not to work. The
> system that provides the XML source is not accessible to the outside
> world so I don't have a proper URL that I can give you. Any URL should
> will work fine though except when the url has and ampersand in it...
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="";>
> <xsl:output method="xml"/>
> <xsl:template match="/">
> <xsl:copy-of
> id=12345')"/>
> </xsl:template>
> </xsl:stylesheet>
> Here is a snippet that uses a variable that unfortunately works the same.
> <xsl:variable
> id=12345</xsl:variable>
> <xsl:copy-of select="document($DocumentURL)"/>
> So I don't really believe that there is a solution to this but if anyone
> sees anything or has any ideas I would love to hear about it.

It would be good if you said what error message you get.  I tried this
syntax on a web site of mine.  The syntax succeeded using msxml3 and saxon,
but of course the url that was retrieved failed to parse.  The was clear
(and expected) from the error message.  You are trying to get an html file
and that will fail for the same reason.

On the other hand, the version of Xalan 1 that I tried claimed that the url
was malformed, and that's wrong.  That's a bug.

So you need to determine whether the operation fails because an html file is
not well-formed, or because the xslt processor has a problem with the url
syntax - which would be a bug because that syntax is correct.


Tom P

 XSL-List info and archive:

Current Thread