This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how can I, include a HTML file into an xsp.xsl file
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] how can I, include a HTML file into an xsp.xsl file
- From: "Thomas B. Passin" <tpassin at mitretek dot org>
- Date: Mon, 8 Oct 2001 10:48:29 -0400
- References: <LEEAJMIOFDILJCHLMFNGIELKCAAA.oscar@nxtsis.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
[oscar]
> how can I, include a HTML file into an xsp.xsl file??
>
> I want include a part of one external HTML code into the xsl file.
>
If you mean this literally, you can't. That's because HTML is not
well-formed XML and so cannot actually be included.
There are three approaches you can do:
1) Make sure your HTML file is well-formed. Then you can include it using
xsl:copy-of.
2) Use a non-XML processor to wrap your HTML file in a CDATA section and a
root element, then use document() to get it and stuff it into your document.
This turns it into plaint text, but it might be waht you want to do if your
goal is to display HTML source code.
3) Use a reference mechanism, like NDATA entities or processor instructions,
and just point to the HTML file. Then your processor has to know what to do
with it, which is outside the ken of xslt.
Cheers,
Tom P
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list