RE: Embedding HTML Doc into XSL or XML

Subject: RE: Embedding HTML Doc into XSL or XML
From: Sunitha <sunitha@xxxxxxxxxxxx>
Date: Wed, 16 Aug 2000 18:07:46 +0530
Hi Mike,

My problem is the HTML doc is actually a word Doc, which i would be
converting to HTMl file on the fly, and moreover only the file name of the
doc is available to me, which means at the time of coding i would not know
the contents of the file.
 Now, considering my requirements, would it be possible to go ahead with
your suggestion or is there any alternative for it.
I tried using Xlink-embed in the XML file(having got tired with trying out
in XSL), but somehow i am unable to use that option properly.

Could you pl. suggest ?

Thanks a lot.
Sunitha



-----Original Message-----
From: Mike Brown [mailto:mike@xxxxxxxx]
Sent: Monday, August 14, 2000 11:30 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Cc: sunitha@xxxxxxxxxxxx
Subject: Re: Embedding HTML Doc into XSL or XML


I answered this question on the list for you on August 11. Here is the
same answer, again.

Sunitha wrote:
> Hi all,
> Could anyone help me out with my problem.
> I want to embed an HMTL doucment into and XSL stylesheet.
> Is it possible?

FAQ. 

The correct/elegant way is to make the HTML well-formed XML by following
the guidelines of the XHTML 1.0 Recommendation.

http://www.w3.org/TR/xhtml1/

Then you can copy the whole thing with xsl:copy-of.


If you must use poorly-formed data and you do not need to access the
internal structure of the HTML, and if you are using an XSLT 1.0 processor
(*not* IE5's default processor), you have the option of making the HTML be
a single block of character data:

<![CDATA[<BODY><P><BR>very bad HTML</LI></HEAD>]]>

which you can then put into a text node with an instruction to the XSLT
processor to flag that text node as not having its content subjected to
the escaping that might otherwise occur upon output, depending on the
output method chosen:

<xsl:text disable-output-escaping="yes"><![CDATA[bad html goes
here]]></xsl:text>

or, if the data is in the source tree:

<xsl:value-of select="." disable-output-escaping="yes"/>

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


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


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


Current Thread