Re: Chameleon components

On 2/6/07, Norman Walsh <Norman.Walsh@sun.com> 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.
>
> If
>
>   <p:step type="validate">...</p:step>
>
> can do one of several different kinds of validation (XSD, RNG, SCH)
> and
>
>   <p:step type="xslt">...</p:step>
>
> can perform either XSLT 1.0 or XSLT 2.0 transformations, then I
> think we have a clear need for two different types of parameters
> (which I'd been hoping, perhaps naively, that we could avoid).
>
> If we're going to go this way, I wonder if it's worth revisiting the
> names of components. Using the types as the GIs would give us two
> places to put parameters: on the element or in a p:parameter.
>
>   <p:validate language="http://www.w3.org/2001/XMLSchema">
>     ...
>   </p:validate>
>
> and
>
>   <p:xslt version="2.0">
>     <p:param version="1.2"/>
>     ...
>   </p:xslt>
>
> would be unambiguous.



Personally, having step types identified by the element name would be much
better as we could use attributes to configure the step.  That would allow
differentiation between step configuration (e.g. schema language or
XSLT version) and parameters to that invocation (e.g. stylesheet
parameters).

This is certainly inline with many other well known "process control"
languages (e.g. ant).

In the end, the only issue becomes pipeline validation.  In XML Schema, you
can
solve this using a substitution group.  Relax has a similar mechanism.  As a
pipeline
"knows" its built-in components, that isn't as much of a problem to
configure
the schema.

In XSLT, extension namespaces are identified in some way.  If we did a
similar thing,
a pipeline processor would know the difference between a step and some
random
markup for documentation or other purposes.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Wednesday, 7 February 2007 16:49:53 UTC