[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] xmllint -format, xsltproc and CDATA section
Subject: Re: [xsl] xmllint -format, xsltproc and CDATA section From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 28 Aug 2003 10:28:53 +0100 |
> Given: > > <programlisting><![CDATA[int i;]]></programlisting> Which is just a long way of writing Given: <programlisting>int i;</programlisting> as CDATA does nothingunlessthere are < and & characters. > xmllint -format translates it a multi-line block as follows: > > <programlisting> > <![CDATA[int i;]]> > </programlisting> which is not equivalent, extra white space has been added to "pretty print" the file. I don'tknow xmllint but if it is specified as not changing the effective document and only adding redundeant white space, this is a bug. If it is specified as just a pretty printer that might change your document then don't use it if changing your document is bad. xsltproc, with <xsl:output method="xml" cdata-section-elements="programlisting"/>, translates this to: > <programlisting><![CDATA[ > TO_DATE (:fieldname, 'format') > ]]></programlisting> I doubt it changes "int i;" to quite that, but I know what you mean, and that looks correct, given its input. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xmllint -format, xsltproc, Wendell Piez | Thread | [xsl] boolean values, Keller, Matt |
Re: [xsl] xmllint -format, xsltproc, Daniel Veillard | Date | Re: [xsl] Re: Incrementing a Global, David Carlisle |
Month |