[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
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 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 I'll look into it but my first reaction is that that will break the whole idea of letting the W3C Schema do the QName implementation work. A conforming QName doesn't need a colon - only if the namespace isn't a default namespace. Forcing a colon would seem to me at first glance to break QName conformance (according to the Namespaces in XML spec I would think - a normative reference of the XML Schema Datatypes spec). So in short, we have no need to tell a parser what is a proper QName, it can do that itself. Doing so would break conformance to QName since if 'a:b' is a proper QName then so is 'b'. Plus a NCName is not a subset or superset of QName - they are different branches of the XML Schema datatypes tree. I reckon we are best just leaving QName as the base type, like you originally said, I think. Best regards --- Stephen D Green 2009/11/15 Dennis E. Hamilton <dennis.hamilton@acm.org>: > Hmm, I don't think it is a default namespace problem. I think it is because > we are not requiring a colon in the QName. > > Suggestions: > > Under <xs:simpleType name="prescriontLevelBaseCode_type> I suggest that you > use > <xs:restriction base="xs:NCName"> > > Under <xs:simpleType name="codeExtension_type"> do what is needed to require > a colon in the QName using a pattern. > > > - Dennis > > -----Original Message----- > From: stephengreenubl@gmail.com [mailto:stephengreenubl@gmail.com] On Behalf > Of Stephen Green > http://lists.oasis-open.org/archives/tag/200911/msg00067.html > Sent: Sunday, November 15, 2009 09:33 > To: dennis.hamilton@acm.org > Cc: TAG TC List > Subject: [tag] Re: Checking Enumerative QNames for the TAML-defined simple > values > > Yep, it does work - see latest schema (TAML v1.0.0.3) > > http://www.oasis-open.org/committees/download.php/35196/testAssertionMarkupL > anguage-1-0-0-3.xsd > > [ ... ] > > I note though that the following is also valid (without a prefix): > > <testAssertion xmlns="http://docs.oasis-open.org/tag/taml/200911" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://docs.oasis-open.org/tag/taml/200911 > http://www.oasis-open.org/committees/download.php/35196/testAssertionMarkupL > anguage-1-0-0-3.xsd" > id="illustation-1-0" schemaVersionId="1.0.0.3" time="08:39:23.312" > date="2009-11-30"> > <prescription level="deprecated"/> > </testAssertion> > > because of XML Schema rules, so the namespace prefix is optional. > > I'm not expert enough to know for sure why this is but > I guess it might be because the attribute itself does not need > a namespace declaration; something to do with it automatically > taking the default namespace?? Anyway, that it a bit too geeky > for me to worry me. Just suffice that the namespace and prefix > happen to be optional. The side effect of that is that folk have > to be aware that the schema will not catch typos for the built-in > values; i.e. > > [ ... ] > > --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]