[Bug 2923] Possible conflicts between schemas and instances

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2923





------- Additional Comments From fsasaki@w3.org  2006-02-23 13:43 -------
(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).

Received on Thursday, 23 February 2006 13:43:39 UTC