xsl-list
[Top] [All Lists]

RE: Process HTML Doc with XSL

2003-05-09 10:52:34
[ Karl J. Stubsjoen]

I'd like to throw an HTML source (well formed of course), 
against an xsl
stylesheet.  So, think of the HTML code as an HTML snippet, 
and think of the
xsl stylesheet as an HTML template document.
Up until now, I've only processed XML document with XSLT.  
So, I'm not sure
if what I would like to do is Ok, acceptable, not possible, or what.


If the source document is well-formed, as you said it is, then it is xml
and you just treat it like any other xml source.  What is your question?

If you want html (non-xml) output, then use the html output method.
Remember that the stylesheet, being an xml document, must be well-forme
dand cannot have html-isms like <br>.  Just make everything well-formed
and the html serializer will take care of the rest.  Also, do not use
the html entities (like &nbsp;), because, of course, xml dose not define
them.  Well, you can define them yourself using a DTD, but it is easier
just to use the equicalent numeric character references like &#160;
instead.

If you want xhtml output, use the xml output method.

Cheers,

Tom P

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



<Prev in Thread] Current Thread [Next in Thread>