RE: [xsl] Process HTML Doc with XSL

Subject: RE: [xsl] Process HTML Doc with XSL
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 9 May 2003 13:52:34 -0400
[ 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;

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


Tom P

 XSL-List info and archive:

Current Thread