OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Help with Schema

[ Lists Home | Date Index | Thread Index ]
  • To: "Xml-Dev \(E-mail\)" <xml-dev@lists.xml.org>
  • Subject: Help with Schema
  • From: "Wilson David" <David.Wilson@iie.qld.gov.au>
  • Date: Fri, 15 Aug 2003 08:47:10 +1000
  • Importance: normal
  • Priority: normal
  • Thread-index: AcNitf9G99sQmM6hEde72wAL2232BQ==
  • Thread-topic: Help with 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:simpleType>
			<xs:restriction base="xs:integer">
				<xs:minInclusive value="100000"/>
				<xs:maxInclusive value="399999"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>

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:simpleType>
			<xs:restriction base="xs:string">
				<xs:pattern value="\i{2}\d{8}"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>


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.

Thanks

David 
--------------------------------------------------------------------------------------------------------------------------
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).







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS