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

Help with Schema

  • To: "Xml-Dev \(E-mail\)" <xml-dev@l...>
  • Subject: Help with Schema
  • From: "Wilson David" <David.Wilson@i...>
  • Date: Fri, 15 Aug 2003 08:47:10 +1000
  • Importance: normal
  • Priority: normal
  • Thread-index: AcNitf9G99sQmM6hEde72wAL2232BQ==
  • Thread-topic: Help with Schema

asset number schema
I am developing a schema and have come across several issues which I need some help with.

1. For one of the elements valid data is defined by multiple number ranges, eg the value must be between 100000 and 399999 or be in the range 25 to 60. While I can define a single range using the mininclusive and maxinclusive tags as shown below, I need help with the multiple range problem. 

	<xs:element name="Cost Code">
			<xs:restriction base="xs:integer">
				<xs:minInclusive value="100000"/>
				<xs:maxInclusive value="399999"/>

2. One of the elements will have the format of two letters followed by eight digits (eg PP12345678). As shown below using Value="\i{2}\d{8}" works. However the value of the initial two letters within this string will come from a small defined list. The eight digits will come from one or more number ranges. I am not sure how to incorporate this into the schema.

	<xs:element name="Asset Number">
			<xs:restriction base="xs:string">
				<xs:pattern value="\i{2}\d{8}"/>

3. Two elements within the schema have an either / or relationship. A valid XML document can contain only one of these elements, not both. How can this be reflected in a schema? 

If this is not the appropriate forum for questions of this type I would be grateful if you could point me in the right direction.


IMPORTANT: This email (including any attachments) may contain confidential,
private or legally privileged information and may be protected by copyright. You may
only use it if you are the person(s) it was intended to be sent to and if you use it in an
authorised way. No one is allowed to use, review, alter, transmit, disclose, distribute,
print or copy this e-mail without appropriate authority.
If this e-mail was not intended for you and was sent to you by mistake, please
telephone or e-mail me immediately, destroy any hard copies of this e-mail and delete
it and any copies of it from your computer system. Any legal privilege and 
confidentiality attached to this e-mail is not waived or destroyed by that mistake.
It is your responsibility to ensure that this e-mail does not contain and is not affected
by computer viruses, defects or interference by third parties or replication problems
(including incompatibility with your computer system).


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.