Rick Jelliffe on NRL and DSDL (Defaults, PSVI)
Rick Jelliffe on Namespace Routing Language and DSDL (Defaults, PSVI)
Date: Fri, 20 Jun 2003 15:17:06 +1000 From: Rick Jelliffe <email@example.com> To: firstname.lastname@example.org Subject: ANN: Namespace Routing Language
From: "Chris Wilper" <email@example.com>
> Well, this looks really promising. I had a quick read of > the spec and a question came up, re: Concurrent Validation > and defaults.
> I couldn't discern what happens with default values > in this case. Say I'm doing WXS validation and > schematron validation on an instance doc. The WXS > schema provides a default value for some item in > the instance. Would the schematron validation > phase pick up the default value?
For NRL, these would happen in parallel. The Schematron schema would not pick up any new PSVI items. Notionally, ISO DSDL Part 4 Validation Candidate Selection Language works by selecting sections of documents and diverting them through various schemas (or subsequent processes). As I understand it, NRL does not currently provide in itself any way to apply, say, Schematron as a function on the output of a WXS transformation/validation.
If you wanted to transform a document, e.g., by adding default values taken from an XML Schema, this would have to be done using some prior transformation of the document. The general ISO DSDL framework is expected to provide various kinds of transformation operations, which should cope with Chris' request.
ISO DSDL is based on modularity, achieved by the simple pipeline architecture of "XML-in, XML-out". There is no PSVI (in the sense of information items of kinds other than those in the XML infoset) and all validation results are not specified by the framework (in the sense that a schema language may specify various kinds of validation results, or the implementations may do so, but there is not expected to be a PSVI-style node-by-node outcome specified at the schema level.)
The general reason for this is a belief (shared by most of the instigators of the inidividual schema languages that are being standardized in ISO DSDL) that document transformation (such as adding defaults) and validation are different things and should be disentangled.
The problem with defaults values as part of schema languages is that they mean that in order to be sure of the infoset of a document, you have to be sure that the document has been validated. This is the same problem that XML DTDs have; its sounds good to have defaults, but it is so impractical to tie them to validation (i.e., validation of the kind where you have to download a schema as well as a document) for data transmission that people won't use them.
Furthermore, I think some of the schema language creators suspect that a schema language can be good for providing the information for closely-coupled systems (i.e., for data binding, where typing is important) or for loosely-coupled systems (i.e., where the information set needs to be independent of validation, where validation may occur at any point in the processing chain, and where information items are handled generically as elements, attributes, etc ) but probably not for both.
NRL looks really nice. It is the third generation of implemented languages for this use, each a good advance on the last: Murata-san's RELAX Namespaces, James' NLM and now James' NRL. I expect ISO VCSL will look pretty much like NRL, if it proves useful enough.
What amuses me is how much this all breaks the cliche that Asians are only good at taking Western ideas and making them into concrete technologies: with both RELAX and RELAX Namespaces we have an Asian's ideas being implemented by a Westerner. Japan and other Asian countries are now crammed full of XML expertise and overflowing with creativity: can the West's regional NIH syndrome be overcome?
On a more reasonable note (i.e., not attempting to substitute one cliche for another), it is interesting that Schematron too was developed in Asia in part as a response to non-Western requirements (in the case of Schematron, the suggestion from an IT professor that many Taiwanese students found the idea of grammars for natural language ludicrous, because of the non-tokenized nature of Chinese.)
[2003-06-20] "... By the way, James' new implementation of Schematron 1.5 looks pretty nice. I especially like it that he seems to have implemented the assert/@subject attribute, which allows error messages to be linked to a troublesome location with a finer grain than the default (the rule/@context node is usually but not always the subject of the assertion.)
Schema languages are looking pretty good now. ISO DSDL is looking very healthy and attractive, and the distant W3C XML Schemas 1.1 will undoubtedly reach giddying heights.
I also like that James has added support for WXS to Jing. This will help people who want to use NRL to tie together WXS and Schematron, for example, or who have legacy WXS schemas they want to use alongside with analgesic RELAX NG schemas. I hope W3C Schema WG might consider adopting NRL as a way forward for future, less monolithic versions of WXS.
NRL's benefit is that allows you to use closed schemas as if they were open, but in a controlled way. Rather than making openness or closedness a property of the individual schema (and hence always sooner-or-later wrong), it is can be a property of the validation-candidate selection language. So you can take a closed XHTML schema and add in SVG elements without having to worry about adjusting the schemas for HTML to be open or without having to re-jib the SVG schema to allow non-SVG elements at the top-level.
I didn't get the importance of this until the last few weeks: Arjun's thread on "what use are namespaces?" really brought it out to me. With NRL, it seems we have a major new way to approach namespaces and schemas to get more of XML Namspaces' advertised benefits for modularity. It is pretty exciting.
Prepared by Robin Cover for The XML Cover Pages archive. See the news item "Namespace Routing Language (NRL) Supports Multiple Independent Namespaces."