Re: Namespace bindings

On 8/15/07, Alex Milowski <alex@milowski.org> wrote:
> Implementations that use a standard XPath (e.g. JAXP) would have to inspect
> the p:option's select for single variable references and do the right thing with
> in-namespaces and option values.  If you have your own XPath implementation,
> you can just define a variant type with the proper conversions and
> everything works out quite nicely.

After thinking about this a bit more, I'm certain that all an implementor has to
do is look for a single variable reference.   Any variable reference not
part of a larger expression is a reference to an option value and the in-scope
namespaces of that option value should be preserved.   Otherwise, they
just set the string value of the option as variables in the context and
evaluate the expression.

That means you don't need to anything with variant types in XPath and this
is much easier to implement.

-- 
--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, 15 August 2007 15:21:19 UTC