On Sun, 23 Sep 2001, Erwin Bolwidt wrote:
>
>
> On Fri, 21 Sep 2001, James Strachan wrote:
>
> > Just a thought and I've seen murmurings around the web along similar lines,
> > but how about having an extension function which is capable of defining a
> > namespace prefix? Something like
> >
> > define-namespace('x', 'someURI')/x:foo/x:bar
> Sounds okay, with a bit of semantics. What is the return value of
> define-namespace?
>
> Supposing it is some value that means 'true' in a boolean context, what
> would this mean?
This really rubs me the wrong way. I simply don't like the declarative
stuff inside of the xpath.
Can someone send me a use-case?
If you're using XSLT type of thing, it provides a set-the-prefix
method by itself.
If you're using it within Java, is it mostly to avoid having to
create and set a NamespaceContext?
Howsabout if we make it more transparent, and have a
SimpleNamespaceContext set up automagically.
XPath xpath = new XPath("x:foo/x:bar");
xpath.addNamespaceTranslation( "x", "http://x.org/" );
List results = xpath.selectNodes( myContext );
Would something like that be bothersome? Or would the problem?
-bob
_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest