cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@indexgeo.com.au>
Subject Re: [patch] sitemapv05.rng fixes
Date Fri, 29 Nov 2002 07:10:23 GMT
Bruno Dumon wrote:
> David Crossley wrote:
> > Thanks Bruno, i left your patch until after getting Colin's
> > RNG/Schematron stuff in.
> > 
> > However, i do not understand the purpose of your patch.
> > Would you please explain in a little more detail.
> 
> Of course.
> 
> One part of the patch makes sure that the schema accepts map:parameter's
> for map:select elements, which is obviously required.
> 
> The more controversial part of the patch is that it removes all elements
> that could normally occur inside a map:action declaration and replaces
> that with allowing any content inside map:action. This is required,
> simply because inside a map:action you can put additional configuration
> information, but the exact contents depends on the implementation of the
> action (and since users can implement their own actions it's impossible
> to foresee what that could be).

Thanks, that is an excellent explanation. Now i can also write
a sensible cvs commit log message.

> Note that this should actually be the case for all component
> declarations (map:generator, map:serializer, etc). A quick look at the
> schema reveals that this is e.g. the case for map:selector but not for
> map:generator and others, so there are still other errors there.

I made a reference to this email thread inside sitemap-v06.rng
to remind us.

> I just stumbled across the map:action case because I needed some custom
> configuration there for forrest which caused the validation to fail.

I have added the same changes to the Forrest copy.

> The nice thing about relax ng however is that we could add extra
> validation rules for specific component implementations (ideally all the
> ones that are shipped with cocoon), depending on the value of the "src"
> attribute.

Yes we have now reached a stage where we can build upon
the basic grammar to do strong validation.

> So if you agree with the above I could further optimize the schema so
> that:
>  - it allows any element (and any attribute) on the component
> declaration elements (thus on map:generator, map:transformer,
> map:reader, map:serializer, map:matcher, map:selector and map:action)
> 
>  - and add an example of how the schema of the configuration of a
> specific component implementation can be defined

Please do. Just provide more patches please - either via
the list or preferably via Bugzilla so we do not lose them.

> Hopefully I have not caused more confusion now :-)

Not at all. This is great thanks. It provides a good basis
for further work.
--David
 
> > Bruno Dumon wrote:
> > > attached you'll find a patch for the sitemapv05.rng grammar fixing the
> > > following:
> > >  - map:select should be able to have map:parameter's
> > >  - map:action component declaration should allow any xml as content
> > > 
> -- 
> Bruno Dumon                             http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> bruno@outerthought.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message