xsl-list
[Top] [All Lists]

Re: Output XML just as it is...

2004-03-02 07:44:42
At 1:32 AM -0700 3/2/04, Karl J. Stubsjoen wrote:
Hello,

I have some XML (which is really XHTML on the inside) that I'd like to
output as an exact copy of HTML (without using CDATA).  Also, it might be
necessary to alter the SRC property of an IMG element, so would consider
some sort of IMG match and copy all properties but alter SRC.


This is not possible with pure XSLT 1.0 because XSLT parses the document. This removes a lot of insignificant information like entity reference names and positions, CDATA section delimiters, and white space inside tags and in the prolog and epilog, and the document type declaration. To do what you're asking you need to not parse the document by just reading it from an InputStream.
--

  Elliotte Rusty Harold
  elharo(_at_)metalab(_dot_)unc(_dot_)edu
  Effective XML (Addison-Wesley, 2003)
  http://www.cafeconleche.org/books/effectivexml
  http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA

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



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