Subject: Re: [xsl] Proposed syntax for namespace binding in XPath From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 19 Apr 2007 18:56:41 +0200 |
The basic idea is simple:
("your special syntax") and rest/of/expr ("your special syntax")[2] | rest/of/expr
For example, with namespace binding syntax, this could become:
("xmlns(xmlns=http://mynamespace xmlns:you=http://yournamespace)")[2] | path/with/you:your-namespace
In interesting idea. But I can think of some further drawbacks:
1. Not easy to recognize when the syntax is in use (applies to human readers as well as XPath processors)
2. Impossible to generate error messages: difficult to diagnose mistakes
3. Is there really such a thing as a no-op? Your examples aren't: the first example changes EXP to boolean(EXP) and the second causes an error if the expression delivers atomic values rather than nodes.
An adaptation that eliminates these disadvantages would be:
saxon:namespaces("xmlns=abc.uri xmlns:p=pqr.uri"), EXPR
(I think that E1,E2 where E1 is an empty sequence really IS a no-op)
But it feels a bit like an abuse.
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Proposed syntax for names, Florent Georges | Thread | [xsl] Re: xsl-list Digest 1 Apr 200, Abel Braaksma |
Re: [xsl] Question about grouping a, Mukul Gandhi | Date | Re: [xsl] Proposed syntax for names, Abel Braaksma |
Month |