[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [tag] Re: Checking Enumerative QNames for the TAML-defined simple values
Additional PS: The [xml-names] specification for XML Namespaces says nothing about the use of QNames as the value of attributes (apart from the restriction of ID and IDREF type to NCNames as a consequence for namespace validity). Using prefixes and QNames in the values of attributes is an extended use and it has to be established by any individual application that introduces it. Fortunately, there is enough call for this that the XML Schema supports it with a base type, as you demonstrated when you ginned up the union case. I believe the derivation of a type that has QName for prefixed cases and NCName for unprefixed, enumerated-constant cases is completely within bounds. And it solves the problem you raised originally which is to provide tight syntax checking on the permitted NCName values. Although XML Schema does not show a connection between QName and NCName, you will see in the XML Namespaces specification that QName is built up from NCName via PrefixedName and UnprefixedName. Lexically, a QName is either an NCName or an NCName:NCName. We want to use only the ":" flavor as a QName because the bare NCName is not intended to have any namespace or be checked for Namespace well-formedness. - Dennis -----Original Message----- From: Dennis E. Hamilton [mailto:dennis.hamilton@acm.org] http://lists.oasis-open.org/archives/tag/200911/msg00070.html Sent: Sunday, November 15, 2009 12:36 To: 'stephen.green@documentengineeringservices.com' Cc: 'TAG TC List' Subject: RE: [tag] Re: Checking Enumerative QNames for the TAML-defined simple values Oh, I'm sorry. It was never my intention that the unqualified NCName be treated as a (semantic) QName. The string that has the simple format of an unprefixed NCName is a constant member of an enumeration that is defined for the specific attribute. It has no namespace, not even a default one, and it should not be understood as having one. Only the PrefixedName form is intended to be understood as a QName. If XML Schema had a built-in PrefixedName type, I would have used it. If you don't put in the ":" requirement, the union is useless because NCName and UnprefixedName have the same syntax and so the restriction on NCName is meaningless. That is why "deprecated" got through without qualification. It really is intended that only prefixed names be treated as QNames by the schema assessment. Furthermore, pattern facets for QName restrictions are explicitly allowed by the XML Schema specification. - Dennis PS: I suggest you try it and then see how well your examples turn out. -----Original Message----- From: stephengreenubl@gmail.com [mailto:stephengreenubl@gmail.com] On Behalf Of Stephen Green http://lists.oasis-open.org/archives/tag/200911/msg00069.html Sent: Sunday, November 15, 2009 11:31 To: dennis.hamilton@acm.org Cc: TAG TC List Subject: Re: [tag] Re: Checking Enumerative QNames for the TAML-defined simple values [ ... ]
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]