Re: [xml] xmllint --noblanks will not strip ignoreable whitespaces



On Thu, May 16, 2002 at 01:34:09PM +0200, Christian Glahn wrote:
ok, i found the spec a bit unclear at this point (or is it just me?): 
the document i tested was:

<x>
<xml>
    test
</xml>
</x>

i assumed the leading and trailing spaces (including the \n) within the xml 
tag as ignoreable whitespace in order of section 2.10 of the XML spec. those 

  they are definitely *not* ignorable !!!

First without DTD validation processing:
"An XML processor must always pass all characters in a document that
 are not markup through to the application."
one can hardly be clearer

And in this case your tag has non-markup content and then any white space
are part of that content.

i ask this because XSLT ignores any leading or trailing whitespace within 
the element's characters.

  I'm not sure I understand, but this sounds seriously wrong !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]