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

How to reference a value in the xml instance document

From: Daniel Einspanjer <deinspanjer@gmail.com>
Date: Tue, 16 Nov 2004 14:03:39 -0500
Message-ID: <f81fa41804111611032854fb55@mail.gmail.com>
To: xmlschema-dev@w3.org
How to reference a value in the xml instance document

Hi folks, I hope that this question makes sense and that it isn't
trivial. I've searched the web and this list's archive before asking
it but I cannot find any leads. :/

In XML Schema, is it possible to refer to a value in the XML document
for purposes of schema validation?  I know that you could use an
appdata node to call out to some other type of schema validator such
as schematron, but I'm hoping this is possible in pure XML Schema.

An example might be easiest.

good xml doc
<person birthYear="1973" deathYear="2004"/>

bad xml doc
<person birthYear="2004" deathYear="1999"/>

can I write a minInclusive restriction in an XML Schema such that the
schema validates that deathYear is greater than or equal to birthYear?

Thanks for your time,

Daniel Einspanjer
Received on Tuesday, 16 November 2004 19:04:50 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.