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

Re: Document() and &

Subject: Re: Document() and &
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Fri, 17 May 2002 11:05:52 -0400
xalan document malformed url
[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="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:output method="xml"/>
>
> <xsl:template match="/">
> <xsl:copy-of
>
select="document('http://www.somewhere.com/getDocument.html?docType=xml&amp;
> id=12345')"/>
> </xsl:template>
>
> </xsl:stylesheet>
>
> Here is a snippet that uses a variable that unfortunately works the same.
>
> <xsl:variable
>
name="DocumentURL">http://www.somewhere.com/getDocument.html?docType=xml&amp
;
> 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.

Cheers,

Tom P


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.