Re: Chameleon components

On 6 Feb 2007, at 09:14 , Norman Walsh wrote:

> A couple of recent threads have indicated support for a sort of
> chameleon component that I'd just assumed we wouldn't touch with a ten
> foot pole.
> ...
>
>   <p:step type="validate">...</p:step>
>
> ...
>
>   <p:step type="xslt">...</p:step>

Oh, please let's not do anything that hard to understand or
validate.  XML works so much better when we use generic
identifiers to identify things, not attribute values.

I'm not even sure we want <p:validate .../> steps which can do
more than one kind of validation; if we do, then I agree with
Norm that we might want two distinct forms of parameter.

If we do, I think it might be more convenient to make them
attributes with different name patterns or in different namespaces.

   <p:validate validator:language="XSD1.1"
       parm:auxfile="foo.aux"/>

In this example, validator:language is a component parameter
and parm:auxfile is a parameter to the particular validation
episode.

MoZ has worried that this would make it too hard to validate
user-defined steps; I don't think so.  Every schema language I
have used can handle validation-time loading of rules governing
new element types, and newer ones like XSD can also allow
any well-formed XML.  (Examples on request, if this blanket
reassurance doesn't reassure you.  But I don't want to belabor
the point beyond what is useful.)

Michael

Received on Thursday, 8 February 2007 14:07:35 UTC