OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tag message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Schema for Extensible Enumerative Attributes


Isn't that overengineering things?

Remember that any attribute can be added to
a prescription element with whatever datatype
required as an extension using the anyAttribute.
The QName (or for that matter, if the TC agrees
to use it, the normalizedString - v1.0.0.2 - or
NCName - v1.0.0.1) is good enough for most
purposes but if you need more, or a more
specific restriction or union, you can specify a
custom attribute to use instead of 'level'
(or 'conflict' if the element is one of the shared
TA parts).

I'll try it out of academic curiosity but I really
don't think we should restrict things any more
(unless the TC as a whole agrees otherwise).

Best regards
---
Stephen D Green




2009/11/15 Dennis E. Hamilton <dennis.hamilton@acm.org>:
> Try this:
>
> <xs:simpleType name="codeExtension_type">
>   <xs:restriction base="xs:QName">
>      <xs:pattern> value="[\c-[:]]+:[\c-[:]]+">
>          <xs:annotation> Any QName with a ":" in it, a PrefixedName
>          </xs:annotation>
>      </xs:pattern>
>   </xs:restriction>
> </xs:simpleType>
>
>  [ ... ]
>
> <xs:simpleType name="prerequisiteConflictCode_type">
>  <xs:union memberTypes="prerequisiteConflictBaseCode_type
> codeExtension_type"/>
> </xs:simpleType>
>
> <xs:simpleType name="prerequisiteConflictBaseCode_type">
>  <xs:restriction base="xs:NCName">
>    <xs:enumeration value="conjunction"/>
>    <xs:enumeration value="disjunction"/>
>  </xs:restriction>
> </xs:simpleType>
>
>  [ ... etc. ]
>
> This should allow all PrefixedName QName forms that are namespace
> well-formed and it should reject all Unprefixed NCNames that are not in the
> list of enumeration values.
>
> I imagine the reason that QName is a base data type is for its use in the
> XML Schema for XML Schema itself.  Fancy that!
>
>  - Dennis
>
>
>
>
> -----Original Message-----
> From: Dennis E. Hamilton [mailto:dennis.hamilton@acm.org]
> http://lists.oasis-open.org/archives/tag/200911/msg00068.html
> Sent: Sunday, November 15, 2009 10:35
> To: stephen.green@documentengineeringservices.com
> Cc: 'TAG TC List'
> Subject: RE: [tag] Re: Checking Enumerative QNames for the TAML-defined
> simple values
>
> 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]