Implementation Experience: Notation is NOT a DERIVED type of QName

Re-sending it 'cos I had the wrong e-mail address.

-----Original Message-----
From: Asir S Vedamuthu [mailto:asirv@webmethods.com]
Sent: Friday, November 03, 2000 9:27 AM
To: Xml Schema Comments Request
Cc: W3c-Xml-Schema-Ig; Ningang chen
Subject: Implementation Experience: Notation is NOT a DERIVED type of
QName


Notation datatype, specified by the schema CR drafts, is different from the
NotationType described by XML 1.0 spec. Why? There are several reasons,

[1] Notation declarations do not provide a QName for the notation. XML
Namespaces provide a simple method for qualifying element and attribute
names used in XML instances. It does not provide a method to qualify
notation names. Reference - http://www.w3.org/TR/REC-xml-names/

[2] Notation declarations provide a Name for the notation. XML 1.0 says that
the values of a notation type must match one of the notation names included
in the declaration. And, Notation declarations provide a name for the
notation. Production rule is,

'<!NOTATION' S Name S (ExternalID | PublicID) S? '>'

Reference - http://www.w3.org/TR/REC-xml#Notations

[3] Notation information item has [name] property and it does not have
[namespace name] and [local name]. Reference -
http://www.w3.org/XML/Group/2000/10/WD-infoset-20001030#infoitem.notation

[4] As per schema CR drafts, notation declarations provide a QName and the
schema author specifies a value (or values) for defining a derived type of
Notation. Example,

<simpleType name='myNotation'>
	<restriction base='NOTATION'>
		<enumeration value="po:type"/>
		<enumeration value="po:code"/>
	</restriction>
</simpleType>

Where 'po:type' and 'po:code' are QNames and they resolve to Notation
Declaration Components in schema definitions. Reference -
http://www.w3.org/TR/2000/CR-xmlschema-2-20001024/#NOTATION
http://www.w3.org/TR/2000/CR-xmlschema-1-20001024/#components

[5] However, instance documents will provide only 'Name' (s) for
NotationType. It will fail to validate against enumerations, {po:type and
po:code}

Also, part 1 and part 2 are inconsistent with respect to Notation
declaration and NOTATION datatype. I see 'name' used in some sections and
QName used in other sections. This is NORMAL 'cos of the last minute
additions and subtractions.



PROPOSED SOLUTION (this is one possibility)

Notation is a primitive type. It cannot be used directly in a schema. Only
datatypes that are derived from NOTATION by specifying a value for
enumeration can be used in a schema. Additional constraints,

(a) the value of all enumeration facets [attribute] value must resolve to a
notation declaration component thru QName resolution (instance) as described
in Part 1
(b) AND, Notation's enumeration facet has a {value} property. Its value is
assigned the [local name] of the given QName
(c) AND, Should be used only in attribute declarations
(d) AND, ..


All the best,

Asir S Vedamuthu
webMethods, Inc.
(Phone) 703-460-2513 (Fax) 703-460-2513 (E-mail) asirv@webmethods.com
URL: http://www.webmethods.com

Received on Friday, 3 November 2000 09:39:03 UTC