[Issue 2979] Xml tags with only attributes return as without attributes ElementParser.parse
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 14 06:36:04 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2979
Sobirari Muhomori <maxmo at pochta.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maxmo at pochta.ru
--- Comment #1 from Sobirari Muhomori <maxmo at pochta.ru> 2009-05-14 06:36:02 PDT ---
why does the code use new Tag instead of tag_ ?
> Alternately change the Tag constructor to report the Tag as START if it has
> attributes. But this will be a bigger change code flow design and efficiency.
> Either way, the onStartTag call returns a Tag with START
It's valid for EMPTY tag to have attributes and as I see Tag constructor parses
empty tag with attributes and sets type to EMPTY. What's wrong with this?
BTW found lack of support for ampersand-quoted attributes:
(line 974)
---
reqc(s,'=');
munch(s,whitespace);
string val;
if(optc(s,'"')){ val = encode(munch(s,"^\"")); reqc(s,'"'); }
else { reqc(s,'\''); val = encode(munch(s,"^'")); reqc(s,'\''); }
munch(s,whitespace);
attr[key] = val;
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list