[erlang-questions] [Patch] XMERL Attributes without whitespaces
Mon Sep 15 10:22:09 CEST 2014
On Mon, Sep 15, 2014 at 9:44 AM, Eranga Udesh <eranga.erl@REDACTED> wrote:
> However W3C (http://www.w3schools.com/xml/xml_validator.asp) validates above
> XLM without any errors. Therefore I guess xmerl better support that.
according to XML 1-1 specification, your example does not adhere to
the grammar. Relevant grammar sections:
 S ::= (#x20 | #x9 | #xD | #xA)+
 STag ::= '<' Name (S Attribute)* S? '>'
 Attribute ::= Name Eq AttValue
Important bit: (S Attribute)*. As you can see, Attribute can never
follow Attribute without a whitespace between them.
> Attached is a patch to fix that. It could help others too, if that patch is
> added to the xmerl package distributed in OTP distribution.
Maybe that W3C parser supports non-spaced attributes is coincidental?
Or maybe I am looking at the wrong grammar?
More information about the erlang-questions