Re: In-scope namespaces and parameter values

On 3/9/07, Norman Walsh <Norman.Walsh@sun.com> wrote:
>
> On the last call, Alex asked about making sure that the in-scope
> namespaces were kept with each p:parameter so that it would be
> possible for steps to interpret QNames in values correctly.
>
> I can't think of a good way to make this work.
>
> In particular, I don't know of any APIs that allow you to do this.
>
> Consider
>
>   <p:xslt>
>     <p:parameter name="foo" value="x:foo" xmlns:x="XXX"/>
>     <p:parameter name="bar" value="x:bar" xmlns:y="YYY-NOT-XXX"/>
>   </p:xslt>
>
> Does anyone know of an XSLT engine which accepts a set of parameters
> with different in-scope namespaces for each parameter?


I wasn't thinking of it as passing the in-scope namespaces to the XSLT
engine.  If the part of the xproc processor configuring the XSLT
processor needs to set a QName valued option, then it would need
the in-scope namespaces to interpret the option.  Similarly, the
same would be true of parameter values.

If the *XProc processor* knows that the value of a parameter (or
> option) is a QName, then it can do the right thing, but I don't think
> we need to say anything special about that case.


I do think we need to mention that the in-scope namespaces are
available to interpret parameters or options that are QName or
XPath expressions.   I don't we have to say *how* that happens.

In my processor, I have a context object from which a component
can get the parameters.  As such, I can easily add a method for
getting the contextual in-scope namespaces.


-- 
--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 Friday, 9 March 2007 20:42:58 UTC