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

Re: only one of the element is req but not both...

From: Eddie Robertsson <eddie@allette.com.au>
Date: Wed, 28 Nov 2001 20:48:29 +1100
Message-ID: <3C04B2ED.53CA7A2E@allette.com.au>
To: "Hanumaiahgari, Srinivas" <Srinivas.Hanumaiahgari@dva.gov.au>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Re: only one of the element is req but not both...
> 1.I got 'dateDispatched' and 'dateDelivered' in my schema and i want to
> check wherein one of them is required but not both and the other should be
> empty.

You can't do this with W3C XML Schema alone but with embedded Schematron rules
it would be trivial. See [1] for an example.

> 2. Can i perform calculations in schema..
> its something like..can i set a field called 'TotalLines' empty to begin
> with,and then sum the lines received in xml doc and hence fill the above
> later.

No, this has to be done in the application.

Cheers,
/Eddie

[1] http://lists.w3.org/Archives/Public/xmlschema-dev/2001Nov/0049.html
Received on Wednesday, 28 November 2001 04:42:29 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.