Re: [xsl] Output XML just as it is...

Subject: Re: [xsl] Output XML just as it is...
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Tue, 2 Mar 2004 09:44:42 -0500
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@xxxxxxxxxxxxxxx
  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


Current Thread