cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Atkin <>
Subject Re: Relax NG validation for Cocoon
Date Thu, 15 Aug 2002 15:38:09 GMT
it was forrest that woke me up to relaxng, but i'm up to a number of 
things atm - this wasn't top of the list...

i'm completely lost where cocoon ends and forrest starts, i'd like to 
see validation first and worry about project boundaries second imho

as for cocoon components (brainstorm):-
- does validation ocur at the parser level or the sitemap level or both?

a quick win could be:-
- use the XNIConfigurableFileGenerator from forrest
- add Andy Clark's JingConfiguration and Jing ( )
- configure in sitemap:-

  <map:match pattern="[pattern]">
    <map:generate src="[filename]" type="xni">
       <map:parameter name="config-class" 
value="org.cyberneko.relaxng.JingConfiguration" />
       <map:parameter name="grammar" value="[grammar-filename]" />

would require some hacking, but i think this generator needs a clean-up 

but then again, this would only work at start of pipeline...

a win all round could be:-

"validator" components, with variants of "doctype|schema|relaxng" (would 
xpath be handy as well?)
- definitions passed in through sitemap could override those in files 
(spec says these are only hints)
- errors cause redirection to error page or logging or whatever is 
- i could see XNI being the saviour here, we could provide 
doctype/schema from xerces and relax from neko + jing, also allows 
anyone else to define their own validation components if they need them
- issues are reliance on xerces and pre-sitemap validation (perhaps 
multiple parser configs in cocoon.xconf? but how does code choose which 
to use?)
- don't know enough technicalities about mid-pipeline components

what do you think?


David Crossley wrote:

>Ian Atkin wrote:
>>>David Crossley wrote:
>>>Please do not give up, Ian. Cocoon can certainly do validation
>>>as an XML framework now using DTDs. Perhaps later using other
>>>schema (Relax NG anyone?).
>>i'm currently investigating relaxng:-
>>- jing seems the validator to use, any probs?
>See the Apache Forrest mail archives: there have been a few
>threads in the past about using Relax NG and there is one
>thread happening there now.
>I recall two reports to Forrest of experiments with Jing
>(around 6 months ago).
>One thing that i am not clear about, is where such validation
>capability should be. Is it in Cocoon or Forrest? I suspect
>in Cocoon.
>We need to be able to validate sources and aggregations at
>various points of the pipeline. How does that fit with
>Cocoon architecture - a new component?
>>- also relaxng has no way for docs to identify schema, any ideas?
>In my experiments, Jing is told on the command-line which
>*.rng to use against a particular doc.xml, i.e. the declaration
>is external to the xml instance.
>Please check that your question  has not already been answered in the
>FAQ before posting.     <>
>To unsubscribe, e-mail:     <>
>For additional commands, e-mail:   <>

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message