Re: key attribute missing in generated dtd

Jeroen van Rotterdam wrote:
> DOMBuilder has the following method:
> 
> DOMBuilder.abort(String key)
> 
> The generated dtd contains:
> 
> <!ELEMENT abort EMPTY >
> <!ATTLIST abort
>     id ID #IMPLIED
>     obj CDATA #REQUIRED
>     interface (DocumentLS|DOMBuilder) #REQUIRED
> 
> Which is lacking the key attribute.......
> Probably has something to do with the name "key"
> 
> 
> Any idea ?

The listing of DocumentLS and DOMBuilder as potential values for 
interface would suggest that you generated the DTD from a draft where 
both interfaces had an "abort" method (which isn't the case in the last 
public draft).

Neither dom-to-dtd.xsl or dom-to-xsd.xsl is sufficiently smart enough to 
fabricate a common element definition from conflicting definitions of 
the same method name.  It generates the element from one (probably first 
in document order in the combined spec) and assumes that any other use 
will be compatible.  When that isn't the case, you have to suppress the 
automatic generation and provide a hand-crafted element.  The exclusion 
of 'load' on line 240 of dom-to-dtd.xsl is an instance of this effect. 
(Related is a fixup in the dom?-combine.xsl that make the argument names 
of Element.getElementsByTagName and Document.getElementsByTagName 
identical).

You might review whether both "abort" methods are needed or whether 
their arguments could be synchronized.

If you explicitly specify the interface attribute, the test-to-xxx.xsl 
transforms should not have a problem.

Received on Wednesday, 5 February 2003 00:44:20 UTC