Re: legal use of anySimpleType

Sorry not to have replied to your earlier posting more quickly.

"Butler, Mark" <Mark_Butler@hplb.hpl.hp.com> writes:

> [W]hen I try to process the XML Schema [3] produced by the UAProf
> drafting committee XML Schema tools report errors as the schema uses
> anySimpleType.
>
> Please can you tell me whether using anySimpleType in this way is legal?

No, it isn't.

> Despite reviewing the specs and your issue list, I am afraid I am still
> confused? I suspect that E1-22 [4] in the errata for XML Schema is intended
> to clarify this but I'm afraid the decision is not clear to me?

E1-22 doesn't change this fact, which has been true from the
beginning.  It does clarify it a bit:

  "Also, change the next paragraph (the next-to-the-last in [section
   3.14.1]) as follows:

    The simple ur-type definition must not be named as the base type
    definition of any user-defined atomic simple type definitions: as
    it has no constraining facets, this would be incoherent."

This section is non-normative -- the normative expression of this
constraint is in 3.14.6:

  "Schema Component Constraint: Derivation Valid (Restriction, Simple)

   The appropriate case among the following must be true:
   1 If the {variety} is atomic, then all of the following must be true:
     1.1 The {base type definition} must be an atomic simple type
         definition or a built-in primitive datatype."

The simple ur-type definition (anySimpleType) is neither an atomic
simple type definition or a built-in primitive, so it can't be the
base type definition of a user-defined atomic type definition, which
is what you try to oo in your schema document [3].

A quick glance suggests you could base your type definitions on the
xs:token type and get what you want.

Regarding Jane Hunter's query [5], I can't immediately put my hands on
my reply, if indeed I made one at the time, but I would say now that
a) what she wants to do _is_ OK and b) it's not at all the same as
what you're doing -- she's defining a _complex_ type that _extends_
aST by allowing attributes, which is altogether different from
trying to define a _simple_ type by _restricting_ aST.

ht

> I note Jane Hunter [5] has also asked the same question, although in
> a different context, so perhaps you can point me to your reply?
>
> [3]
> http://www.openmobilealliance.org/tech/profiles/uaprof/xmlschema-20030226 
> [5]
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0091
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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 Friday, 5 December 2003 07:42:03 UTC