#12 Improved documentation for XML processing

closed
nobody
None
5
2005-08-27
2004-05-21
No

The element:

<point x="0" y="2001" />

causes onsgmls to complain about extra character data
(specifically) the "/" character at the end of the element:

onsgmls:SCN6M_SUBM.10.mag.xml:10:23:E: character data
is not allowed here

The relevant excerpt from the DTD is:
<!--
points specify an x coordinate and a y coordinate.
-->
<!ELEMENT point EMPTY>
<!ATTLIST point
x CDATA #REQUIRED
y CDATA #REQUIRED
>

The parsers I use to read this data; however, get the
start/end events exactly as expected.

-a

Discussion

    • status: open --> open-invalid
     
  • Logged In: YES
    user_id=32597

    Thanks for the report.

    onsmgls is a SGML parser that by default assumes the
    "reference concrete syntax" plus some limits raised.

    To make onsgmls accept the XML syntax feed the XML
    declaration to the parser first:

    nsgmls -wxml -s /usr/share/sgml/openjade/xml.dcl test.xml

    test.xml:

    <!DOCTYPE x [
    <!ELEMENT x (point)>
    <!ELEMENT point EMPTY>
    <!ATTLIST point
    x CDATA #REQUIRED
    y CDATA #REQUIRED
    > ]>
    <x>
    <point x="0" y="2001" />
    </x>

    maybe we can provide better documentation on this issue.

     
    • labels: --> 105985
     
    • labels: 105985 -->
    • summary: onsgmls chokes on shortcut XML closes --> Improved documentation for XML processing
     
  • Terje Bless
    Terje Bless
    2005-08-27

    • status: open-invalid --> closed