OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [relax-ng] Re: Question about WXS datatypes ID, IDREF andIDREFS


On Wed, 2003-07-23 at 19:21, Kohsuke Kawaguchi wrote:
> The DTD compatibility spec does not define its own ID datatypes. IOW,
> there's no such thing as "DTD ID type".
> It simply defines the "ID-ness" that can be assigned to datatypes.

Yes, I use to say "ID" type of the DTD compatibility datatype library
but maybe even this isn't accurate...

> > This could lead to schemas being valid for a RNG processor supporting
> > only WXS datatypes and invalid for a RNG processor supporting both DTD
> > and WXS types.
> 
> This is true. Some instances could be considered valid by a RNG processor
> without DTD compatibility support, and the same documents could be
> considered invalid by a RNG processor with DTD comp. support.

That even applies to schemas if I get it well and:

element foo { element id { xsd:ID }}

or

element foo { attribute id {xsd:id}}
, element foo { attribute id {token}}

are two examples of schemas which are valid if the processor supports
only WXS and invalid if it supports also DTD compatibility.

I am not really sure why, but I find this nastier than for the instance
documents...

> I believe one option we've considered is to add something like SOAP's
> @mustUnderstood so that the schema can say "I want to require this
> particular extension (like DTD compatibility) for this schema"

Yes, that's a good remark: DTD compatibility is both a feature and a
datatype library. Which makes me wonder... 

If I wanted to define a datatype library with added constraints such as:
"this datatype can only appear in an attribute", would you consider this
as "valid"? To me, it would be breaking the assumption of independence
between the markup and the content. Furthermore, if I look at the
definitions of the data and value patterns, such as:

datatypeAllows(u, ln, params, s, cx)

There isn't enough information to check if the value is in an element or
an attribute or a list token.

Is this what you meant in your first sentence; that this is a feature
(checking ID types) associated to a datatype library (which just does
the lexical control)?

Thanks

Eric

-- 
Have you ever thought about unit testing XSLT templates?
                                                     http://xsltunit.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]