[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: defining a leading bullet for unordered lists

From: Andreas Peter <info@minimag.de>
Date: Sun, 17 Feb 2008 19:20:03 +0100
Message-ID: <47B87AD3.5060103@minimag.de>
To: XML Schema List <xmlschema-dev@w3.org>
Re: defining a leading bullet for unordered lists

Hello Pete,

that was exactly the solution for my problem.

Thanks so much,
Andreas

Pete Cordell schrieb:
>
> I'm not entirely sure I understand what you want, but you have 
> probably forgotten that the patterns defined in XML schemas must match 
> the entire thing they're matching, not just fragments of it.  
> Therefore, your patterns need to be something like:
>
> <xs:pattern value="~.*"/>
> <xs:pattern value="–.*"/>
> <xs:pattern value="•.*"/>
>
> HTH,
>
> Pete Cordell
> Codalogic
> Visit http://www.codalogic.com/lmx/ for XML C++ data binding
>
> ----- Original Message ----- From: "Andreas Peter" <info@minimag.de>
> To: "XML Schema List" <xmlschema-dev@w3.org>
> Sent: Sunday, February 17, 2008 10:50 AM
> Subject: defining a leading bullet for unordered lists
>
>
>
> Hello xmlschema-developers,
>
> I am trying to right a schema for an unordered list where the first
> character must be a dot, wave dash or simple a dash. But something is
> not working :-(
>
> This is my idea:
>
> <xs:element name="lists">
> <xs:complexType>
> <xs:choice>
> <xs:element name="listUnordered">
> <xs:complexType mixed="true">
> <xs:choice maxOccurs="unbounded" minOccurs="0">
> <xs:element name="list_dot" type="dotType"/>
> <xs:element name="list_dash" type="dashType"/>
> <xs:element name="list_wavedash" type="wavedashType"/>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> <xs:element name="listOrdered">
> <xs:complexType mixed="true">
> <xs:choice maxOccurs="unbounded" minOccurs="0">
> <xs:element name="list_level1"/>
> <xs:element name="list_level2"/>
> <xs:element name="list_level3"/>
> </xs:choice>
> </xs:complexType>
> </xs:element>
> </xs:choice>
> </xs:complexType>
> </xs:element>
>
> <xs:simpleType name="wavedashType">
> <xs:restriction base="xs:string">
> <xs:pattern value="~"/>
> </xs:restriction>
> </xs:simpleType>
>
> <xs:simpleType name="dashType">
> <xs:restriction base="xs:string">
> <xs:pattern value="–"/>
> </xs:restriction>
> </xs:simpleType>
>
> <xs:simpleType name="dotType">
> <xs:restriction base="xs:string">
> <xs:pattern value="•"/>
> </xs:restriction>
> </xs:simpleType>
>
>
> The problem is that the pattern for the simpleType does not work. I also
> tried to use unicode characters but still the same.
>
> Thank you for helping me,
> Andreas
>
>
>
>
>
>
>
Received on Sunday, 17 February 2008 18:20:12 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.