Re: XDB 0.3 available (XMLized Docbook 3.0)

>Now available at
>
>   http://www.sonic.net/~tallen/xdb03.zip
>
>is a DTD derived from DocBook 3.0 that I believe is valid XML.  Thanks
>to Norbert Mikula for pointing out that the %local.foo.foo; parameter
>entities, which are defined with the content "", are illegal per
>XML-lang production 46.  The sole difference between XDB 0.3 and
>XDB 0.2 (which I've removed) is the deletion of these parameter
>entities and an updated copyright notice.
>
>This change blows away the DocBook customization mechanism.  The
>purpose of distributing this DTD is solely to determine what 
>constitutes a valid XML DTD.  Obviously some other method of
>customization will be required (unless the SGML ERB can be
>persuaded to relax its strictures on empty parameter entities).

Not all empty parameter entities are illegal.  In particular, empty
p.e.s or parameter entities which expand to blanks are legal in
productions 29 (between declarations, as replacement for markupdecl),
29 (%S), 38 (after element name -- can we say 'tag-omissibility
hack'?), and within entity declarations.  The latter means that
the XML rules intended to encourage 'simplicity' can, like those of 
8879, be evaded by adding another level of indirection.

>The quick hack that comes to mind is to define these pe's as
>containing a placeholder element ZZZZZ, which would be declared
>
><!ELEMENT ZZZZZ EMPTY>

This won't help within an attribute declaration, and isn't necessary
for the declaration of elements (since a parameter entity replacing
'markupdecl' can be empty -- since markupdecl itself is defined as
'(a | b | ...)*'

>without an ATTLIST.  As I remarked earlier, I'd be happy to
>hear of other solutions.  As the DTD is fairly useless without
>the customization mechanism, this version cannot be considered
>progress on the road to a proper XMLlated DocBook that the
>Davenport Group would want to distribute.  Mea culpa.

Not your fault at all, I don't think.

Note that this is illegal:

 <!ENTITY % local.name.atts ''>

 <!ELEMENT name    (#PCDATA) >
 <!ATTLIST name    %local.name.atts; 
           id      ID       #IMPLIED
           stdform CDATA    #IMPLIED >

But this is *legal*:
  
 <!ENTITY % local.name.atts ''>
 <!ENTITY % std.name.atts '
           id      ID       #IMPLIED
           stdform CDATA    #IMPLIED'>
 <!ENTITY % all.name.atts '
           %local.name.atts
           %std.name.atts' >

 <!ELEMENT name    (#PCDATA) >
 <!ATTLIST name    %all.name.atts; >

(I.e. exactly the same thing, with the addition of one more layer
of indirection, to ensure that hoi polloi don't understand the DTD)

Since the rules for expanding parameter entities within parameter-entity
declarations effectively act as an infinitely flexible escape hatch,
I wonder whether we really want or need the plus, instead of a
star, in production 46.

Should it not perhaps be

  AttlistDecl ::= '<!ATTLIST' S %Name S? (%(Attdef*))* S? '>'

instead?  This would allow DocBook and other built-to-be-customized
DTDs to remain a little more straightforward.

-C. M. Sperberg-McQueen

Received on Monday, 5 May 1997 12:23:22 UTC