Altova Mailing List Archives


Re: [xml-dev] RE: Difference between "normalize" and "canonicalize"?

From: "G. Ken Holman" <gkholman@----------------.--->
To: "'xml-dev@-----.---.---'" <-------@-----.---.--->
Date: 2/26/2009 6:21:00 PM
At 2009-02-25 19:22 -0500, I wrote:
>At 2009-02-25 19:03 -0500, Costello, Roger L. wrote:
>>1. Why is the Schema non-normative?
>
>Because the semantics of the schema language used, W3C Schema 1.0, 
>are not rich enough to express all of the constraints for XSLT as an 
>XML vocabulary.  I believe the RELAX-NG schema semantics are rich enough.

Based on the flak I've had to deflect in off-list private 
correspondence from a number of people regarding my statement above, 
please accept my apology if my intent was misunderstood.

I (mis?)interpreted Roger's post to be in regard of using 
schema-aware tools to analyze the presence and absence of elements 
and attributes in an XML document, such as would be the role of a 
generic XML editor.

My experience with XSLT and emacs and RELAX-NG is that I have yet to 
find any constraints in the presence and absence of elements and 
attributes allowed by the XSLT 1.0 and 2.0 vocabularies, such as the 
co-occurrence constraints I cited for attributes:

>For a definitive example, one cannot express in W3C Schema 1.0 
>semantics that two attributes are mutually exclusive or mutually 
>non-exclusive.  For example, in an XSLT template rule you can have 
>either a match= attribute or a name= attribute or both but not 
>neither.  You can say this in RELAX-NG-speak but not in W3C-Schema-speak.

I thought I was explicit when I said "all of the constraints for XSLT 
as an XML vocabulary".  I wasn't saying "all of the constraints for 
XSLT as an XSLT stylesheet".  And I added "as an XML vocabulary" 
expressly to indicate I was not talking about stylesheet constraints, 
only vocabulary constraints: the presence and absence of elements and 
attributes.  I even gave an example of the kinds of constraints I was 
speaking of.

Never would I expect any generic schema language to express the 
constraints on the semantic interpretation of values found within its 
elements and attributes.  That is the purview of the applications 
interpreting the semantics of the instances.

Forgive me for leaving the impression to some readers that I was 
lauding RELAX-NG for having such features.

Those are not the purview of generic applications tasked with simple 
requirements (such as for editing XML documents) where the author is 
guided in avoiding the improper creation of instances based on 
explicit rules for the presence and absence of attributes.  Seems to 
me to be a good role for schema constraints.

I trust I've made my intent clear now ... I was only trying to help 
by sharing my personal experiences with XSLT, emacs and RELAX-NG that 
I thought were directly in line with Roger's inquiries.

. . . . . . . . . . Ken

--
XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@C...
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.