Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Extensible Enumerations Technique >Thread Next - RE: defining elements with patterns and childelements defining elements with patterns and childelementsTo: XML Schema List <xmlschema-dev@--.---> Date: 3/11/2008 10:31:00 PM
Hello schema-experts,
I spent the whole day with tinking and trying and now my head is totally
empty. I have the following complexType which describes a listType for
unordered and ordered lists:
<xs:complexType name="listType">
<xs:sequence>
<xs:element name="unorderedlist" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="˜.*"/>
<xs:pattern value="–.*"/>
<xs:pattern value="•.*"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="orderedlist" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9].*"/>
<xs:pattern value="[a-z].*"/>
<xs:pattern value="[i-iiii]{1,4}.*"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
My aim: the element unorderedlist or orderedlist should start with an
special pattern (see above) and after the pattern it should be possible
to use text or other elelemts.
Example:
<orderedlist>1. This is an orderedlist with a special<specchar>
character</specchar> and again text.</orderedlist>
<orderedlist>2. This is an orderedlist again with a special<specchar>
character</specchar>.</orderedlist>
Does anyone out there have an idea how to realise such an approach? I
hope the question is understandable so far :-)
Thanks sooo much to everyone.
Andreas
From mike@s... Wed Mar 12 00:15:12 2008
Received: from maggie.w3.org ([193.51.2 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
