[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [ebxml-cppa] Use of Name versus NMTOKEN
It seems that our use of the NMTOKEN data type in the CPP/A schema is not quite correct. (Please see enclosed message from Anli Shundi.) We should use the Name data type instead. I intend to incorporate this change into the 1.04 draft unless anyone objects. The difference between Name and NMTOKEN is as follows: [Definition: A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string " xml", or any string which would match (('X'|'x') ('M'|'m') ('L'|'l')) , are reserved for standardization in this or future versions of this specification. Note: [E98]The Namespaces in XML Recommendation [XML Names] assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must accept the colon as a name character. An Nmtoken (name token) is any mixture of name characters. Names and Tokens [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') ( NameChar)* [6] Names ::= Name (#x20 Name)* /* [E62] */ [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)* / Whereas a NMTOKEN may start with a digit, a Name cannot start with a digit. -Arvola -----Original Message----- From: Anli Shundi <ashundi@tibco.com> To: 'Arvola Chan' <arvola@tibco.com> Cc: Xan Gregg <xan@tibco.com>; Ismail Suayah <ismail@tibco.com> Date: Friday, January 11, 2002 10:21 AM Subject: using NMTOKEN for element content in cpp-cpa-1_1.xsd >Hi, > >I validated by chance cpp-cpa-1_1.xsd regarding non-deterministic warning >and our validator warns also: > >Warning: in element "ReliableMessaging" in namespace >"http://www.oasis-pen.org/committees/ebxml-cppa/schema/cpp-cpa-1_1.xsd": > in element "MessageOrderSemantics" in namespace >"http://www.oasis-open.org/committees/ebxml-cppa/schema/cpp-cpa-1_1.xsd": > element "MessageOrderSemantics" in namespace >"http://www.oasis-open.org/committees/ebxml-cppa/schema/cpp-cpa-1_1.xsd": > type "NMTOKEN" is reserved for attribute use only and is here for >compatibility with XML 1.0 (Second Edition) > >The warning comes because you're using the type for element content >rather than for an attribute. I would suggest using XMLSchema's "Name". >It differs by NMTOKEN by restricting the first character. >http://www.w3.org/TR/xmlschema-2/#terminology >http://www.w3.org/TR/xmlschema-2/#Name >http://www.w3.org/TR/xmlschema-2/#NMTOKEN > > <simpleType name = "messageOrderSemantics.type"> > <restriction base = "NMTOKEN"> > <enumeration value = "Guaranteed"/> > <enumeration value = "NotGuaranteed"/> > </restriction> > </simpleType> > > >Anli Shundi ashundi@tibco.com >Senior Developer office: (919) 969-6518 >TIBCO Software Inc. mobile: (919) 672-5934 > >www.extensibility.com | www.XMLschema.com | www.tibco.com > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC