Fernand <[EMAIL PROTECTED]> writes:

> Experimenting with tagsoup (I'm using GHC 6.8.2 and tagsoup-0.6), I
> found something which appears to me as strange behaviour : when
> parsing tag's attributes that have spaces enclosing the "=" sign,
> tagsoup seems to interpret these as empty attributes' names and
> values. For instance (notice the spaces enclosing the equal sign) :

I don't think that is legal XML. The definitions of STag and Attribute
from http://www.w3.org/TR/xml11/#NT-STag are:

  [40]   STag      ::=  '<' Name (S  Attribute)* S? '>'
  [41]   Attribute ::=  Name Eq AttValue 

And 'S' represents one or more whitespace characters, so it seems
clear that they are not allowed between Name, Eq, and AttValue.

Whether this is the right behavior for TagSoup, which is styled as a
fast-and-loose XML/HTML processor, is another matter.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to