Re: DOM3 Validation: External grammars (possible delegation to load/save?)

Curt Arnold wrote:

>> There does not seem to be any provision for the caller to specify a
>> specific grammar for validation.  Validation depends on the document
>> containing a document type declaration, a xsi:schemaLocation or equivalent.
>
...

Benjamin C. Chang wrote:

>We decided to not add the requested functionality.   There are
>different ways to determine what schema is associated with the
>document, e.g., DOM L3 CORE schemaTypeInfo, but since there
>is no standard mechanism to bind schemas to documents, we will
>not be the ones to specify such a standard or to indicate how to attach
>such schemas to documents.
>
>If schema location were modified or removed, behavior would be
>implementation dependent.
>
>Thanks,
>Ben
>  
>

I believe that validation against an external schema (that is, one not 
specified my xsi:schemaLocation or a document type declaration) is a 
very significant use case for validation and one for which there is no 
mechanism to accomplish by my reading of the L3 drafts.

Since the effect of modifying or removing the schema location 
information (for example, adding an xsi:schemaLocation attribute) is 
implementation dependent, there is no mechanism after the document is 
loaded to modify the schema location. 

However, this suggests that load/save might be the appropriate part of 
L3 to address the issue. One possibly mechanism would be to extend 
DOMBuilder.createDOMBuilder  to have a schemaLocation or schemaNode 
parameter that could specify the URL (or Node) for the schema document 
to be used during document parsing.

I'll concede that the validation draft may not be the place that needs 
to address this use case, but I would strongly suggest that the use case 
be addressed by one of the specs.  I would be satisified with delegating 
this issue to another subspec as a resolution, however I would not be 
satisified if there was no mechanism in L3 to address this use case.

Received on Monday, 2 June 2003 23:25:56 UTC