On Thu, 2002-11-28 at 10:52, 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).

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 just stumbled across the map:action case because I needed some custom
configuration there for forrest which caused the validation to fail.

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.

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

Hopefully I have not caused more confusion now :-)

> 
> 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
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to