ISSUE-30: yes and no, true and false ...

its_yes-no_in-xsd

yes and no, true and false ...

State:
CLOSED
Product:
MLW-LT Standard Draft
Raised by:
Maxime Lefrançois
Opened on:
2012-06-22
Description:
Hi all,

I'm writing the RDF equivalent vocabulary for ITS 2.0, I have a XSD feasibility question.

In ITS data categories, most attributes have 'yes' or 'no' as possible values. XSD defines xsd:boolean, but I guess you had reasons to choose yes or no instead... My feasibility question is not about switching to xsd:boolean.

I want to specify the range of my data categories properties, so I was looking in the http://www.w3.org/TR/its/its.xsd document, and the "yes or no" restriction of the xsd:token type is redefined for every attribute.

for instance in term attribute:
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="yes">
<xs:annotation>
<xs:documentation>The value 'yes' means that this is a term.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="no">
<xs:annotation>
<xs:documentation>The value 'no' means that this is not a term.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>

I understand this enables editing tools to display specific documentation when needed. Would it be possible to keep the benefit of these documentation features while defining a new datatype, and thus having something like this:

<xs:simpleType name="yesOrNo">
<xs:restriction base="xs:token">
<xs:enumeration value="yes" />
<xs:enumeration value="no" />
</xs:restriction>
</xs:simpleType>

and then in term it would look nearly the same as before, except for the base that is "yesOrNo" :

<xs:simpleType>
<xs:restriction base = "yesOrNo" >
<xs:enumeration value="yes">
<xs:annotation>
<xs:documentation>The value 'yes' means that this is a term.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="no">
<xs:annotation>
<xs:documentation>The value 'no' means that this is not a term.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>

So that I can use itsxsd:yesOrNo as the range of its:term for instance the RDF-based ITS 2.0 vocabulary.
If this method isn't correct or feasible (XSD experts will tell), is there any other method that would be a help ?

Kind regards,
Maxime Lefrançois

Related Actions Items:
No related actions
Related emails:
  1. Re: ACTION-147: Write something for option a) of rdf conversion, plus XSLT (from maxime.lefrancois@inria.fr on 2012-07-03)
  2. Re: ACTION-147: Write something for option a) of rdf conversion, plus XSLT (from fsasaki@w3.org on 2012-07-03)
  3. Re: ACTION-147: Write something for option a) of rdf conversion, plus XSLT (from maxime.lefrancois@inria.fr on 2012-07-03)
  4. mlw-lt-track-ISSUE-30 (Maxime): yes and no, true and false ... [MLW-LT Standard Draft] (from sysbot+tracker@w3.org on 2012-06-22)

Related notes:

Closed by reply from Jirka at
http://lists.w3.org/Archives/Public/public-multilingualweb-lt/2012Jun/0128.html

Felix Sasaki, 26 Jun 2012, 21:38:40

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 30.html,v 1.1 2014-01-21 15:46:13 kahan Exp $