This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: http request - unexpected characters after document end


Hi Syn-Ti,

I have never known anyone to use document() to call a XML by its full URL
(http://www.google.com), and am unsure if the specifications for XSLT allow
including an XML which isn't on your own server.

As far as I know, server-side includes (SSI) don't allow includes of other
host names

ie - you can't do
<!--# include virtual = "http://www.yahoo.com/include.html"; -->
only
<!--# include virtual = "/path/include.htm" -->

I would assume this would be the same for document()

Anyone know?  - I checked out the spec and I couldn't see anything which
explicitly said you could or couldn't do this, nor was their anything I
could find in the XSLT books I've got lying around.

Cheers,
Tim Watts


> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Syn-Ti Ng
> Sent: Thursday, 30 August 2001 4:44 PM
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] http request - unexpected characters after document end
>
>
> I want to access an x(ht)ml file from a live site using
> document(). However, no matter what URL I try, I keep getting
> an error about 'unexpected characters after document end'.
> Anyone else had this problem?
>
> This is the code I'm using:
>
> <xsl:variable name="httpReq" select="document
> 'http://www.google.com')" />
>
> <xsl:template match="/">
>         <xsl:copy-of select="$httpReq" />
> </xsl:template>
>
> Here is the exact error:
>
> Fatal error reported by XML parser: unexpected characters
> after document end (found "N")
>   URL:    http://public.h3ga.hutch.com/~syntin/xsltest.html
>   Line:   2
>   Column: 3
> javax.xml.transform.TransformerException:
> org.xml.sax.SAXParseException: unexpected characters after
> document end (found "N"): org.xml.sax.SAXParseException:
> unexpected characters after document end (found "N"):
> unexpected characters after document end (found "N")
>
> I am using saxon to process the xsl.
>
> Thanks, Syn-Ti
>
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]