gnue-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnue-dev] Problems in DTD [patch]


From: John Lenton
Subject: [Gnue-dev] Problems in DTD [patch]
Date: Mon, 20 May 2002 17:05:47 -0300
User-agent: Mutt/1.3.27i

The gnue-forms.dtd (forms/doc/gnue-forms.dtd) has several
well-formedness problems. I realize it is a generated file, but I
don't realize what .gfd it's generated *from*, and I'm not about to
fiddle with gnuedtd without knowing what to check it against :)

- Comments along the lines of

    <!-- +-------------------+ -->
    <!-- |   Hello, World!   | -->
    <!-- +-------------------+ -->

  XML 1.0 spec (2nd ed), section 2.5 (Comments), 1st paragraph, says

    [...] For compatibility, the string "--" (double-hyphen) must
    not occur within comments.

  The patch turns these comments into

    <!-- +- - - - - - - - - -+ -->
    <!-- |   Hello, World!   | -->
    <!-- +- - - - - - - - - -+ -->

- Several AttListDecls are broken, because AttListDecls are

    AttlistDecl    ::=    '<!ATTLIST' S Name AttDef* S? '>'
    AttDef         ::=    S Name S AttType S DefaultDecl
    DefaultDecl    ::=    '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)

  note that '#DEFAULT' doesn't exist. You just put the default
  value. This patch therefore removes all '#DEFAULT's.

- boolean parameter-entity reference is misdefined:

    <!ENTITY % boolean "(%true;) #IMPLIED">
    <!ENTITY % true "">

  which is wrong as well as not being well-formed; you probably wanted
  something along the lines of

    <!ENTITY % boolean "(%true;|%false;) #IMPLIED">
    <!ENTITY % true "1">
    <!ENTITY % false "0">

  the patch fixes this, too; the values for 'true' and 'false' are as
  above, but they might be wrong (you tell me).


--
John Lenton (address@hidden) -- Random fortune:
Puede suceder lo que sea; siempre hay uno que lo veia venir.
                -- Fernandel. 

Attachment: patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]