forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: Xinclude and (in)validation
Date Thu, 06 Feb 2003 00:20:28 GMT
Replying myself. Found a doc that explains it.
http://www.xml.com/pub/a/2002/07/31/xinclude.html?page=2

Nicola Ken Barozzi wrote, On 06/02/2003 1.07:
> 
> J.Pietschmann wrote, On 06/02/2003 1.00:
> 
>> Nicola Ken Barozzi wrote:
>>
>>> What should I do now? %-|
>>
>>
>> Plug in the validation processor after the XInclude processor.
>> Didn't someone just announce such a compenent on the Cocoon
>> list?
> 
> 
> Hmmm... we are doing validation as a step before even Cocoon being 
> called. I don't think it's even correct to validate a document at every 
> call, it should be done beforehand IMHO.
> 
> That said, and looking at your suggestion, it seems that I'm starting to 
> understand why some talk about validation being toed to a processing 
> definition...
> 
> The fact is: is the xml fragment I posted valid xml?

Nope, it doesn't validate.

>  How the heck is 
> xinclude to work in the real world with validation?

Relevant answer in the above cited doc:
"
One of the most common questions about XInclude is how inclusion 
interacts with validation, XSL transformation, and other processes that 
may be applied to an XML document. The short answer is that it doesn't. 
XInclusion is not part of any other XML process. It is a separate step 
which you may or may not perform when and where it is useful to you.

For example, consider validation against a schema. A document can be 
validated before inclusion, after inclusion, or both. If you validate 
the document before the xi:include elements are replaced, then the 
schema has to declare the xi:include elements just like it would declare 
any other element. If you validate the document after the xi:include 
elements are replaced, then the schema has to declare the replacement 
elements. Inclusion and validation are separate, orthogonal processes 
that can be performed in any order which is convenient in the local 
environment.
"

So, since I want xinclude functionality to be present, also because I 
imagine that we can xinclude parts of site.xml to generate consistent 
multi-project sites, how are we going to solve this?

Possibility: plug in an xinclude step before the validation. There is an 
xinclude task somewhere, if not we can make it.

Dunno, I'm going to sleep now, maybe tomorrow it will be clearer 8-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message