Hi
I've just started using spring-xml which is part of spring-ws project and I have quickly noticed inconsistencies in these two interfaces:
Code:org.springframework.xml.xpath.XPathOperationsFirst one allows operations on top of javax.xml.transform.Source, the second one allows only operations on top of org.w3c.dom.Node.Code:org.springframework.xml.xpath.XPathExpression
What I would like to do is to create precompiled XPathExpressions and then evaluate them by passing an instance of Source (in my case org.springframework.xml.transform.ResourceSource).
I don't think adding methods taking InputSource to XPathExpression should be a problem since javax.xml.xpath.XPathExpression takes both Node and InputSource. Maybe I am overlooking something?
Also note following inconsistency:
Code:XPathOperations: double evaluateAsDouble(String expression, Source context) throws XPathExceptionThanks.Code:XPathExpression: double evaluateAsNumber(Node node) throws XPathException;
Jaro


Reply With Quote