dtdparse-trackers
[Top] [All Lists]

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

2007-04-19 15:21:19
Support Requests item #1645610, was opened at 2007-01-26 15:07
Message generated for change (Comment added) made by ehood
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.

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

>Comment By: Earl Hood (ehood)
Date: 2007-04-19 17:19

Message:
Logged In: YES 
user_id=115552
Originator: NO

Would you provide the input files you used for dtdparse?

I downloaded the zip bundle from w3c for the mathml2 dtd, ran
dtdparse on it, and I got no errors.


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

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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/