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

Re: is there any formal commercial identity constraint cases

From: Boris Kolpackov <boris@codesynthesis.com>
Date: Sun, 13 May 2007 20:44:44 +0200
To: "Le, Yongnian" <yongnian.le@intel.com>
Cc: Michael Kay <mike@saxonica.com>, xmlschema-dev@w3.org, "Jones, Kevin" <kevin.jones@intel.com>, "Yu, Zhiqiang" <zhiqiang.yu@intel.com>
Message-ID: <20070513184444.GA13653@karelia>
Re: is there any formal commercial identity constraint cases

Hi Yongnian,

Le, Yongnian <yongnian.le@intel.com> writes:

> That's a pity that there is no real application having identity
> constraints, maybe because that feature is quite advanced.

I did a quick search over our schema repository. The following
two "real" schemas appear to use identity constrains:

3DXML                                             http://www.3ds.com/3dxml
Open Vulnerability and Assessment Language (OVAL) http://oval.mitre.org/


> 1.     Identity constraint processing creates dependence between
> validations in different SAX events, which make it hard for further
> advanced optimization; while regular expression in schema validation
> can be processed in a single SAX event validation.

This is not entirely correct. SAX can deliver content for an element
or attribute over several calls to characters().


> 2.     Identity constraint requires typed based comparison, which
> might involve a lot of table/value-object/memory management, type
> conversion and string operations during validation;

That's another reason why it is a good idea to do validation and
data extraction as one step. Luckily the element/attribute that is
specified in the field declaration should be of a simple type. This
way you only need to handle a handful of built-in XML Schema simple
types when it comes to comparing the values. Figuring out if types
are related by inheritance could be tricky though.


hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding
Received on Sunday, 13 May 2007 18:47:38 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.