cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arnaud Le Hors" <leh...@us.ibm.com>
Subject RE: [ANN] XInclude processor for xml-commons
Date Tue, 06 May 2003 12:59:11 GMT
> Well, if you want to go by the letter of the spec, which Joerg tells us
> assumes validation to happen after XInclude processing

This is not true. XInclude is defined to work with an infoset. How you get
this first infoset and what you did with it (transformed, validated, etc.)
before it is passed to the XInclude processor is totally open.

It is true that the spec doesn't request XInclude processors to deal with
extensions, such as those found in a PSVI. XInclude processors are only
required to produce an infoset. So, you may waste your time validating
before, if what you're interested in is extensions of the infoset that get
dropped by the XInclude processor. But it's up to the user to decide.

The bottom line is that there is no universal answer to the question of when
XInclude should be processed. Different users may have different needs and
answer it differently.

Now, the main use of XInclude that we anticipate is basically to replace
external entities references. In this case one is likely to want to process
it fairly early on. Most likely before validation, especially XML Schema
validation. So, from a Xerces point of view, we would want to support it by
providing an XNI component that people can put in the parser pipeline
typically, but not only, before the validator. Cocoon which looks at
documents at a different level may want it at the SAX level.

To end, I'll add a note on the debate over the "infoset-messing validation".
Here again there is no universal solution. If all you are dealing with is
XML documents - this is text -, validation merely means checking that your
document validates against a set of constraints. You couldn't care less
about any infoset augmentations in an environment where everything is text.
On the other hand, if what you are dealing with is XML data - this is
objects serialized in XML -, validation is the way you reconcile serialized
objects with their real type. Infoset augmentations are then fundamental and
can hardly be considered as messy... So, beware of over simplistic
characterizations... :-)
--
Arnaud  Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.


Mime
View raw message