xsl-list
[Top] [All Lists]

Re: xmllint -format, xsltproc and CDATA section

2003-08-28 02:24:16
  Right, still I could accept this as a bug report (though not
in the right place), adding the newlines around the CDATA section
ain't particulary smart ...
  Taro Ikai, if you want this to be fixed, log this in libxml2
bugs on GNOME bugzilla, see http://xmlsoft.org/bugs.html for details.
Note that running xmllint without parameters points to that page for
bug reports or help.

Daniel

On Thu, Aug 28, 2003 at 09:17:37AM +0100, Michael Kay wrote:
I don't understand. Why are you using a program (xmllint) that adds
whitespace to your XML if you don't want whitespace added to your XML?

Michael Kay

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf 
Of Taro Ikai
Sent: 27 August 2003 20:42
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] xmllint -format, xsltproc and CDATA section


Given:

    <programlisting><![CDATA[int i;]]></programlisting>

xmllint -format translates it a multi-line block as follows:

    <programlisting>
<![CDATA[int i;]]>
    </programlisting>

  yes that should not be done.

xsltproc, with <xsl:output method="xml" 
cdata-section-elements="programlisting"/>, translates this to:

         <programlisting><![CDATA[
TO_DATE (:fieldname, 'format')
      ]]></programlisting>

  That's normal and should not be changed.

The net result is that formatting by xmllint and XSLT is not 
'closed'. 
Everytime I run the combination of xmllint -format and XSLT, 
the CDATA 
section
gets longer by two lines (one line at the beginning and one 
line at the 
end).

Is there a way to get around this?

Taro Ikai

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



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

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel(_at_)veillard(_dot_)com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | 

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