Yeah, sorry, I mis-spoke... meant it would be nice to be able to do "//mynode" from a
given node in the tree and have it not return null just because it's not root (assuming
there is a "mynode" under the given node.
And actually, the current way it works is not really "contrary to xpath" because
On Jan 26, 2005, at 5:45 AM, Edwin Dankert wrote:
It seems to be relatively easy to change the code but I am not sure
what the full impact would be (SAXSource expects a document) ...
probably as Paul suggested sub-classing DocumentSource would be the
best solution?
I'm going to attempt to add suppo
> +1 on this... always found the fact that a dom4j xpath doesn't work from
> a given node down to be rather confounding... seems contrary to the
> xpath concept of "context node".
As far as I am aware, a dom4j XPath uses the given node as its
'context node'. (the given node is however not treate
Yes, I agree, that would be the least expensive solution.
It seems to be relatively easy to change the code but I am not sure
what the full impact would be (SAXSource expects a document) ...
probably as Paul suggested sub-classing DocumentSource would be the
best solution?
Edwin
---
+1 on this... always found the fact that a dom4j xpath doesn't work from a given node down
to be rather confounding... seems contrary to the xpath concept of "context node".
b
Maarten Coene wrote:
All patches are welcome :-)
regards,
Maarten
Edwin Dankert schreef:
Yes, that constructor does not s
All patches are welcome :-)
regards,
Maarten
Edwin Dankert schreef:
Yes, that constructor does not seem to be very intuitive.
To get around this problem you could try the following code:
...
DocumentFactory factory = DocumentFactory.getInstance();
Document doc = factory.createDocument( element.crea
Edwin Dankert wrote:
Yes, that constructor does not seem to be very intuitive.
To get around this problem you could try the following code:
...
DocumentFactory factory = DocumentFactory.getInstance();
Document doc = factory.createDocument( element.createCopy());
DocumentSource source = new Document
Yes, that constructor does not seem to be very intuitive.
To get around this problem you could try the following code:
...
DocumentFactory factory = DocumentFactory.getInstance();
Document doc = factory.createDocument( element.createCopy());
DocumentSource source = new DocumentSource( doc);
...
R