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

Bug#403164: Ruby's XML Parser does not parse all valid XML



reassign 403164 libxml-parser-ruby1.8
severity 403164 minor
thanks

This is actually a bug in libxml-parser-ruby1.8. See a the
following comment from SOAP::Util:

# Q: why only '&' and '<' are encoded, but not '>'?
# A: because it is not required according to XML spec.
#
# [http://www.w3.org/TR/REC-xml#syntax]
# The ampersand character (&) and the left angle bracket (<) may appear in 
# their literal form only when used as markup delimiters, or within a comment, 
# a processing instruction, or a CDATA section. If they are needed elsewhere, 
# they must be escaped using either numeric character references or the 
# strings "&amp;" and "&lt;" respectively. The right angle bracket (>) may be 
# represented using the string "&gt;", and must, for compatibility, be 
# escaped using "&gt;" or a character reference when it appears in the 
# string "]]>" in content, when that string is not marking the end of a 
# CDATA section.

Since there isn't any CDATA in this case, an unescaped > is perfectly
valid XML. 

More recent versions (post sarge) of SOAP::Util escape > as well just
to be on the safe side of broken XML parsers; I'll go ahead and update
it on the server here so it will start working again, though. [Try
running the XML generated through xmllint! ;-)]


Don Armstrong

-- 
Dropping non-free would set us back at least, what, 300 packages? It'd
take MONTHS to make up the difference, and meanwhile Debian users will
be fleeing to SLACKWARE.

And what about SHAREHOLDER VALUE? 
 -- Matt Zimmerman in <gYuD3D.A.ayC.nGB39@murphy>

http://www.donarmstrong.com              http://rzlab.ucr.edu



Reply to: