Re: [dom4j-user] XSLT at the Node Level

2005-01-26 Thread Ben Munat
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

Re: [dom4j-user] XSLT at the Node Level

2005-01-26 Thread Paul Dlug
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

Re: [dom4j-user] XSLT at the Node Level

2005-01-26 Thread Edwin Dankert
> +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

Re: [dom4j-user] XSLT at the Node Level

2005-01-26 Thread Edwin Dankert
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 ---

Re: [dom4j-user] XSLT at the Node Level

2005-01-25 Thread Ben Munat
+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

Re: [dom4j-user] XSLT at the Node Level

2005-01-25 Thread Maarten Coene
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

Re: [dom4j-user] XSLT at the Node Level

2005-01-25 Thread Robert Koberg
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

Re: [dom4j-user] XSLT at the Node Level

2005-01-25 Thread Edwin Dankert
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