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: how can I, include a HTML file into an xsp.xsl file


[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


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