dtdparse-trackers
[Top] [All Lists]

[Dtdparse-trackers] [ dtdparse-Support Requests-1645610 ] mathml2.dtd defeats DTDParse

2007-01-26 14:08:28
Support Requests item #1645610, was opened at 2007-01-26 21:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=399000&aid=1645610&group_id=30351

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: dtdparse
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tony Graham (tonygraham)
Assigned to: Nobody/Anonymous (nobody)
Summary: mathml2.dtd defeats DTDParse

Initial Comment:
The convoluted construction for the declaration of the MathML namespace in the MathML 2.0 DTD defeats DTDParse.

DTDParse gets confused at 'xmlns:%MATHML.prefix;' during the expansion of:

<!ATTLIST %math.qname;
      %att-topinfo;
      %att-browif; >

with the result firstly that '%MATHML.prefix;' is treated as the attribute value declaration and secondly that DTDParse misses the end of the attribute list declaration and treats the following declaration as part of the attribute list.

The eventual output is:

Loading mathml2.dtd
Loading mathml/mathml2-qname-1.mod
Attlist mml:mathError: %mathml-charent.module; undeclared.


One solution is to expand parameter entity references in entity values as part of parsing the entity declaration in parse_entity().  (I will leave it to a reader more familiar with the code to work out how to pass $expand to parse_entity() to control whether or not to expand entity references.)

Also, the debug output when parsing attribute lists is confusing since there's no labelling of the output of $values and $type.  It doesn't help to have them look the same when DTDParse is reporting one as the other.

Regards,


Tony Graham.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=399000&aid=1645610&group_id=30351

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV