This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2923 - Possible conflicts between schemas and instances
Summary: Possible conflicts between schemas and instances
Status: CLOSED FIXED
Alias: None
Product: ITS
Classification: Unclassified
Component: ITS tagset (show other bugs)
Version: WorkingDraft
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Felix Sasaki
QA Contact: Felix Sasaki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 09:10 UTC by Eric van der Vlist
Modified: 2006-07-24 09:57 UTC (History)
0 users

See Also:


Attachments

Description Eric van der Vlist 2006-02-23 09:10:19 UTC
Some schema languages such as W3X XML Schema or RELAX NG have an XML syntax.

When this is the case, schemas can also be considered as instances and there is
no reason why ITS couldn't be used for the internationalization of the schema
itself (ie to localize the annotations and even the names of the elements and
attributes).

Unfortunately, the <its:documentRules/> element appears to have a different
meaning when found in instance documents and in schemas: in instance documents,
the selectors apply to the document itself while in schemas they apply to the
instance documents described by the schema.

I think that this is wrong, not only because one might want to localize schemas
themselves but also because that means that implementations need to be able to
determine if a document is a schema or not to understand the meaning of
<its:documentRules/> elements. If I use <its:documentRules/> in a new schema
language (let's say I want to use it in Examplotron for instance), the
applications will most probably get it all wrong...

To avoid this confusion, I think that it would be safer to distinguish both
cases and one of the solutions to do that would be to use another name (such as
<its:targetDocumentRules/>) for the element when it applies to the instances
described by a schema.

Eric
Comment 1 Felix Sasaki 2006-02-23 13:43:34 UTC
(In reply to comment #0)
> Some schema languages such as W3X XML Schema or RELAX NG have an XML syntax.
> 
> When this is the case, schemas can also be considered as instances and there is
> no reason why ITS couldn't be used for the internationalization of the schema
> itself (ie to localize the annotations and even the names of the elements and
> attributes).
> 
> Unfortunately, the <its:documentRules/> element appears to have a different
> meaning when found in instance documents and in schemas: in instance documents,
> the selectors apply to the document itself while in schemas they apply to the
> instance documents described by the schema.
> 
> I think that this is wrong, not only because one might want to localize schemas
> themselves but also because that means that implementations need to be able to
> determine if a document is a schema or not to understand the meaning of
> <its:documentRules/> elements. If I use <its:documentRules/> in a new schema
> language (let's say I want to use it in Examplotron for instance), the
> applications will most probably get it all wrong...
> 
> To avoid this confusion, I think that it would be safer to distinguish both
> cases and one of the solutions to do that would be to use another name (such as
> <its:targetDocumentRules/>) for the element when it applies to the instances
> described by a schema.
> 
> Eric

This is a very valid comment. We have not addressed the problem of the position
of <documentRules> elements. Nevertheless, I would propose a "simplifying"
solution, rather than adding another element to ITS:
- we say: "if an ITS <documentRules> element is in an xml document, it always
applies to this document, no matter if that is a schema or another kind of XML
document."
- "if <documentRules> is the root element of a document, it applies to nothing,
and the processing application has to decide what happens."
advantages:
- easy to explain with a parallel to CSS (ITS local = @style attribute;
<documentRules> in an XML document = <style> element in HTML; <documentRules>
element as root element = no information about what the target of the global
rules are, like in a separate CSS stylesheet).
- the precedence rules get simpler, because there is no difference anymore
between global information in a schema versus global information in an instance
document.
- you get the new functionality of expressing ITS information about the schema
itself, while still having the old one (shipping ITS information with a schema,
wich now would happen in a separate file).
Comment 2 Felix Sasaki 2006-03-19 01:42:36 UTC
This is the proposal 4 mentioned at http://lists.w3.org/Archives/Public/public-i18n-its/2006JanMar/0358.html .

At http://www.w3.org/TR/its/#selection-precedence , we have currently the following precedence:
  1. Implicit selection in instance documents (data category attributes on a specific element)
  2. Selections in instance documents (using a documentRules element)
  3. Selections in an external file (using a documentRules element)
  4. In a schema, selections expressed with a documentRules element
  5. Selections expressed with schemaRule (See also the note in Section 4.1.2: Rule-based Selection)
  6. Selections via defaults for data categories, see Section 5.1: Position and Default Selections of Data Categories 

A schema is just "another" external file. Since we don't have schemaRule anymore, the bug mentioned by Eric is resolved. So my proposal is just to leave everything "as it is".
For "mapping" (if we have it), we still need the precedence rule mentioned at http://lists.w3.org/Archives/Public/public-i18n-its/2006JanMar/0347.html
Comment 3 Felix Sasaki 2006-04-08 07:12:29 UTC
We have resolved the conflicts between schemas and instances by abandoning the different status of schemas with respect to <rules> element (former called <documentRules), and by giving up the <schemaRule) element.
See http://www.w3.org/International/its/itstagset/itstagset.html#selection-precedence for the new proposed precedence order.
Comment 4 Felix Sasaki 2006-07-24 09:57:57 UTC
Closed, no further action necessary.