[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: Difference between "normalize" and "canonicalize"?
At 2009-02-25 19:03 -0500, Costello, Roger L. wrote: >Along a similar line ... But should probably have been with a new subject line. >Consider the XSLT specification: in Appendix G is the "Schema for >XSLT Stylesheets" [1] and it is listed as "non-normative." Disclaimer: I wasn't on the committee, so these answers are guesses on my part. There are committee members who read XML-Dev so I'm hoping to hear definitive answers from them. >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. It even says in the introductory documentation that the schema isn't complete: This schema does not attempt to define all the constraints that apply to a valid XSLT 2.0 stylesheet module. I would think you wouldn't want to call something normative unless it was complete. >2. What does it mean for the Schema to be non-normative? It exists as a guideline for those who find schema syntax is useful. >3. Does it mean that where there are discrepancies between what the >prose says and what the Schema says then the prose wins? In this case, absolutely. >4. Why are there discrepancies? Because W3C Schema semantics are not rich enough, and because the authors did not try to make it complete (I can't comment if the former was the cause of the latter). 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. >When will they be resolved? Perhaps when a new version of W3C Schema has rich enough constraint semantics to match what the prose says. If there is demand for it. >5. When will the Schema become normative? Perhaps when the committee feels a particular schema suffices for expressing in formal terms what is stated in the prose. And they perceive a need for it. >6. Can someone, outside the W3C, create a normative Schema for XSLT? I think not. "Normative" is typically reserved for standards status, the purview of which for XSLT is W3C. >7. Or, is creating a Schema for XSLT exclusively within the >jurisdiction of the W3C XSLT working group? I would claim a normative schema is. For a non-normative (and incomplete only because of lack of effort) XSLT schema in RELAX-NG, Norm Walsh has published this: http://norman.walsh.name/2005/04/19/examples/xslt20.rnc I've had to hack at it as I use features of the language he didn't need in the schema. The NXML major mode for emacs reads RELAX-NG schemas so I use the modified version of Norm's work in my stylesheet editing for on-the-fly validation. The combination of NXML and RELAX-NG is great for users of emacs. It would also work in RELAX-NG-aware tools like Oxygen. Interestingly, the one RELAX-NG schema that expresses a document is either an XSLT 1.0 instance or an XSLT 2.0 instance is: xslt10 = external "xslt10.rnc" xslt20 = external "xslt20.rnc" start = xslt10 | xslt20 ... and it all keys automatically on the version= attribute of the document element to validate with the large RELAX-NG for each of the two languages. Very elegant. >Ditto for the other W3C specifications that list in their appendix a >non-normative Schema. Probably the same answer. If the W3C chooses to use W3C Schema 1.0 constraint semantics, they may not be able to express what the prose describes. I gather some W3C committees use RELAX-NG to express their constraints, but I couldn't tell you if those schemas are normative or not ... if I were to guess, I would think they probably would be. I hope this helps. . . . . . . . . . . . . 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|