Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to specify "coupled" attibutes

From: noah_mendelsohn@--.---.---
To: Philippe Poulard <philippe.poulard@------.-----.-->
Date: 10/16/2007 6:15:00 PM
Perhaps the confusion here is about terminology.  More or less in keeping 
with the precedent of XML 1.0 and DTDs, XML Schema uses the term "content 
model" in a very specific way, which is to refer to the combinations of 
sequences, choices and all groups provided by the language.  From that 
point of view, the new assertion facility is completely separate. 

In other respects the two are quite symmetric in their affect on 
validation:  to be valid per a type, the content must satisfy both the 
"content model" in the sense given above, and the assertions.  The only 
asymmetry I'm aware of is that the XPath 2.0 expressions used in the 
assertions can depend in some cases on the types (such as integer) of the 
elements and attributes tested, and those types are typically assigned and 
tested as a byproduct of content model validation.    If your XPath 
doesn't rely on such type assignment, then content models and assertions 
contribute pretty much symmetrically.

As to helping out an editor, it's usually the case that it is easier to 
infer information from simpler languages, and the regular expressions that 
underly schema content models are in that sense quite simple.  If I say 
choice(a,b,c) it's indeed easy for an editor to know to prompt for an a, 
b, or c.  Then again, nothing prohibits an editor from recognizing certain 
simple XPath expressions you might use in an assertion check and doing 
very similar prompting.  Indeed, I'd expect many assertions to be quite 
simple, such as @a > @b, and I wouldn't be surprised that it would be 
quite easy for a schema-directed editor to help you enter an a that's 
greater than b.

Finally, Michael Kay is right in my opinion:  XPath is a declarative 
language.  It is neither imperative nor Turing-complete.  If these 
subject's are of concern, you might also be interested in reading the 
TAG's finding called the Rule of Least Power [1], which was written by Tim 
Berners-Lee with a little editorial help from me.

Noah

[1] http://www.w3.org/2001/tag/doc/leastPower.html

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------





From abcoatesecure-w3c@y... Wed Oct 17 13:14:08 2007
Received: from wiggum.w3.org ([128.30.52.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent