Re: [DOMCore] DocumentType: optional publicId and systemId

On 06/02/2011 11:12 PM, David Flanagan wrote:
> ยง5.7 includes this text:
>
>> When a |DocumentType
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#documenttype>|
>> node is created, its name
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-doctype-name>
>> is always given. Unless explicitly given when a |DocumentType
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#documenttype>|
>> node is created, its public ID
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-doctype-publicid>
>> and system ID
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-doctype-systemid>
>> are the empty string.
>>
>
> But the IDL for DOMImplementation.createDocumentType() is:
>
>> DocumentType
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#documenttype> createDocumentType
>> <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domimplementation-createdocumenttype>([TreatNullAs=EmptyString]
>> DOMString qualifiedName, DOMString publicId, DOMString systemId);
>
> Shouldn't the publicId and systemId arguments be annotated
> [TreatUndefinedAs=EmptyString]? And maybe also
> [TreatNullAs=EmptyString]? Or maybe they should just be declared
> optional and the textual description of createDocumentType should be
> updated to specify the empty string defaults.

Not necessarily. The defaults you quoted don't apply here, as the 
algorithm that defines createDocumentType gives the public and system ID 
explicitly when creating the object.

I haven't changed the spec.

Ms2ger

Received on Friday, 3 June 2011 08:26:47 UTC