 |
 |
 |
Am I right in thinking that datatyping at element level ie <xs:element
name="num" type="xs:integer">
and specifying a choice of attribute values ie
<xs:attribute name="kind">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="volume_number"/>
<xs:enumeration value="page_range"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
......does not go together??????
**************************
Setting out to convert the following DTD element specification...
<!ELEMENT num (#PCDATA | emph)*>
<!ATTLIST num
kind (volume_number | page_range) #REQUIRED>
... into Schema....
<xs:element name="num">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="emph"/>
</xs:sequence>
<xs:attribute name="kind" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="volume_number"/>
<xs:enumeration value="page_range"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
.... I realised, that if I want to make use of the additional
datatyping capabilites of Schema (ie adding a datatype of xs:integer
to the element "num" to allow numerical element content only, for
example), I cannot at the same time specify a choice of required
attribute values, i.e. volume_number and page_range for this element.
As soon as I give the element a datatype
ie <xs:element name="num" type="xs:integer"> no further child element
or attribute specifications are allowed...
I know I can set the integer at the attribute level, which means that
the data needs to be entered within the <num ...."31"> tag rather
than between an opening and closing
<num kind="volume_number">31</num>
but the element is part of a digitisation project template for
transcribers and the idea is, to set up the template in such a way
that it can check data entry at element level, ie keyers only need to
enter data between element tags, not at attribute level....
I guess I am stuck with adding child elements to the <num> element ie
<volume_number> <page_range> and add some datatyping to these...???
|
 | 



|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |