xml-model and DTDs [was: Minutes for XML Core WG telcon of 2011 April 6]

> -----Original Message-----
> From: public-xml-core-wg-request@w3.org [mailto:public-xml-core-wg-
> request@w3.org] On Behalf Of Grosso, Paul
> Sent: Wednesday, 2011 April 06 11:05
> To: public-xml-core-wg@w3.org
> Subject: Minutes for XML Core WG telcon of 2011 April 6


> Henry asks what it should mean if the document has both a
> doctype declaration and an xml-model that points to a DTD.
> 
> Jirka claims that is outside the scope of the xml-model spec.
> 
> The spec already says:

[in the intro]:

 Applications can use the associated schemas for any purpose
 including those such as document validation, content completion
 in interactive editors, or creating models for data binding.
 Presence of an xml-model processing instruction is not in
 itself an instruction to any processor to validate the document,
 nor is it a statement that the document is not to be processed
 without validation. It is a declarative statement of a relationship
 between the document and one or more external schemas.

[then at the end of section 3 which is the end of the spec]:

> 
>  This specification provides a way to associate multiple schemas
>  with a given XML document. Furthermore, there exist other ways
>  certain schemas can be associated with a given XML document.
>  Regardless of the association method, this specification does
>  not prescribe the processing order when multiple schemas are
>  associated with a given XML document.
> 
>  In particular, this specification does not define the interaction
>  of xml-model processing instructions with xsi:schemaLocation and
>  xsi:noNamespaceSchemaLocation attributes which provide hints for
>  locating schema in W3C XML Schema. Applications supporting both
>  xml-model processing instructions and xsi:schemaLocation/
>  xsi:noNamespaceSchemaLocation attributes may provide means for
>  specifying which information takes precedence.
> 


> John says we might add:
> 
>  The presence of an xml-model PI referencing a dtd does not
>  affect the validity of the document which contains it.

I need to reopen this discussion.  While trying to update the
xml-model spec, I realized I'm not sure I'm comfortable with
the above statement.

Sure, at one level, a PI is a PI and therefore cannot affect
the validity of the document which contains it.

But an application such as an editor might peek into the file
and find the xml-model PI and decide to act as though the document
had a doctype declaration that referenced said DTD when it parses
the document.  Or maybe it parses the document as XML, finds that
a xml-model PI associates a DTD with it, and then reparses it using
the DTD as the referenced external subset (in which case the DTD
didn't affect the validity for the first parse, but it did for
the second parse).

I want to keep the whole question of what an application does
with an xml-model PI out of scope of this WG Note (which is just
about providing applications with associated schemas, not about
what to do with them).  And saying that an xml-model PI referencing
a DTD *does not affect* validity is starting to mandate application
behavior.

Given what the spec already says (see the quotes above), what other
wording should we add that addresses questions such as:

* what should it mean if the document has both a doctype declaration
  and an xml-model that points to a DTD.

* are DTDs associated with a document via an xml-model PI used for
  creating or augmenting an information set from a given document?
  Or, are such DTDs simply used for validation rather than augmentation?

without either requiring or forbidding an application doing whatever
it wants with the associated schemas?

paul

Received on Tuesday, 12 April 2011 20:15:13 UTC