W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2002

RE: Schema for schemas bugs?

From: Aung Aung <aaung@microsoft.com>
Date: Tue, 23 Apr 2002 10:37:18 -0700
Message-ID: <22AC3F532BE25849BF04BE95350FF91B03BC50A8@red-msg-08.redmond.corp.microsoft.com>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
Cc: <xmlschema-dev@w3.org>, <www-xml-schema-comments@w3.org>

Thanks Henry. We are now all waiting for the Errata. The following 2
issues is for clarification and commonality, please comment for any
error.

First thing ~~~~~~~~~~~~~
You have memtioned that renaming of anySimpleType or anyType is. Will
there be an errata for this? Below is a mail from you from 11/01.

>> 1.
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
>>       <xs:simpleType name="ct1">
>>             <xs:restriction base="xs:anyType" />
>>       </xs:simpleType>
>> </xs:schema>

>Yes, invalid.

>> 2.
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
>>       <xs:simpleType name="ct2">
>>             <xs:restriction base="xs:anySimpleType" />
>>       </xs:simpleType>
>> </xs:schema>

>Yes, invalid.

>> 3.
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
>>       <xs:complexType name="ct4">
>>             <xs:simpleContent>
>>                   <xs:restriction base="xs:anySimpleType" />
>>             </xs:simpleContent>
>>       </xs:complexType>
>> </xs:schema>

>Yes, invalid.

>But you raise an interesting point -- the above don't actually attempt 
>a restriction, just a private renaming.  There's no reason we shouldn't
>allow this.  The third case in particular, if it contained attributes,
is >something people might reasonably wish to do.

>I'll raise a potential erratum on this.
>Ht

In short, I think we will need the following 2 points in errata.
(1) allow renaming of anyType or AST
(2) Restriction with facets on anySimpleType is not allowed unless the
restriction is build-in dataTypes (to satisfy SfS).



Scond thing:~~~~~~~~~~~~~~~~~~~~~
I agree that 'xmlns:xml="http://www.w3.org/XML/1998/namespace"' is
interpreted differently as allowed by some implementors and not the
others due to the vagueness of the spec, but it is explicit that this
declaration is not required. Therefore the common denominator is to NOT
specify it. In a standard spec like XSD, I think we should not specify
it to satisfy all parties.

Thanks,
-Aung



-----Original Message-----
From: Henry S. Thompson [mailto:ht@cogsci.ed.ac.uk] 
Sent: Tuesday, April 23, 2002 1:28 AM
To: Aung Aung
Cc: xmlschema-dev@w3.org; www-xml-schema-comments@w3.org
Subject: Re: Schema for schemas bugs?

"Aung Aung" <aaung@microsoft.com> writes:

> The issues with the  xsd4xsd in MSXML are, 
> 
>  
> 
> 1. There were some confusion in the beginning about the usage of
> anySimpleType. After some clarification, we allow anySimpleType as a
> type name. However,  the spec also said "simple *ur-type definition*
> <http://www.w3.org/TR/xmlschema-1/#key-urType#key-urType>  must not be
> named as the *base type definition*
>
<http://www.w3.org/TR/xmlschema-1/#st-base_type_definition#st-base_type_
> definition>  of any user-defined simple types: as it has no
constraining
> facets, this would be incoherent." So, how are all the primitive data
> types have restriction facets on anySimpleType. Spes does not say how
it
> allows it. Do we have to special-case all primitive dataType as
> restrict-able from anySimpleType exclusive to for parsing xsd4xsd (for
> such confusing issue, spec should implicit about how to approach it.)?

Sorry for the confusion -- you're right that the inclusion in the
sForS of the 'information only' definitions of the builtin primitive
datatypes is problematic.  I would note in our defense that the quote
above says you can't have anySimpleType as the {base type def} of and
_user-defined_ types, but I agree that taken as a user schema doc.,
the published sForS violates this constraint.

The _reason_ these defns are there is so that for _all_ builtin types
there is a well-grounded URL of the form

   http://www.w3.org/2001/XMLSchema.xsd#typename

but with hindsight we perhaps should have buried all these defns
inside <xs:documentation>.

> 3. Explicit declaration such as
> xmlns:xml=http://www.w3.org/XML/1998/namespace is now allowed by the
> namespace spec. It is explicitly stated in the xml spec that xml:lang
> (http://www.w3.org/TR/2000/REC-xml-20001006#sec-lang-tag) is a special
> attribute to allow language specification in XML, it need not
xmlns:xml
> declaration.  
> 
> [2] 
> 
> PrefixedAttName
> 
> ::= 
> 
> 'xmlns:' NCName
>
<http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName#NT-NCName> 
> 
> [ 
> 
> NSC: Leading "XML"
>
<http://www.w3.org/TR/1999/REC-xml-names-19990114/#xmlReserved#xmlReserv
> ed>  ]
> 
> Namespace Constraint: Leading "XML"
> Prefixes beginning with the three-letter sequence x, m, l, in any case
> combination, are reserved for use by XML and XML-related
specifications.

Microsoft has consistently maintained that this prose allows parsers
to raise an error when confronted by the correct declaration
'xmlns:xml="http://www.w3.org/XML/1998/namespace"'.  Most of the rest
of the implementor community have read it as allowing _only_ this
declaration for that prefix, while not requiring it.  I believe there
will soon be an erratum clarifying this.

> 4. should remove the trailing space in version [version="Id:
> XMLSchema.xsd,v 1.48 2001/04/24 18:56:39 ht Exp "]. Because it is
typed
> as toke, which cannot have trailing space.

It's not a token at all -- this is just a bug and will be fixed.

> 5. Some group reference that already mentioned in other threads.

Indeed.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of
Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is
forged spam]
Received on Tuesday, 23 April 2002 13:37:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:00 GMT