Lines 26-32
Link Here
|
26 |
import org.jaxen.pattern.Pattern; |
26 |
import org.jaxen.pattern.Pattern; |
27 |
import org.jaxen.pattern.PatternParser; |
27 |
import org.jaxen.pattern.PatternParser; |
28 |
|
28 |
|
29 |
import org.saxpath.SAXPathException; |
29 |
import org.jaxen.saxpath.SAXPathException; |
30 |
|
30 |
|
31 |
import java.io.StringReader; |
31 |
import java.io.StringReader; |
32 |
|
32 |
|
Lines 57-70
Link Here
|
57 |
this.context = new Context( getContextSupport() ); |
57 |
this.context = new Context( getContextSupport() ); |
58 |
} |
58 |
} |
59 |
|
59 |
|
60 |
public XPathPattern(String text) { |
60 |
public XPathPattern(String text) throws InvalidXPathException { |
61 |
this.text = text; |
61 |
this.text = text; |
62 |
this.context = new Context( getContextSupport() ); |
62 |
this.context = new Context( getContextSupport() ); |
63 |
try { |
63 |
try { |
64 |
this.pattern = PatternParser.parse( text ); |
64 |
this.pattern = PatternParser.parse( text ); |
65 |
} |
65 |
} |
66 |
catch (SAXPathException e) { |
66 |
catch (JaxenException e) { |
67 |
throw new InvalidXPathException( text, e.getMessage() ); |
67 |
throw new InvalidXPathException(text, e.getMessage()); |
|
|
68 |
} |
69 |
catch (SAXPathException e) { |
70 |
throw new InvalidXPathException(text, e.getMessage()); |
68 |
} |
71 |
} |
69 |
catch (RuntimeException e) { |
72 |
catch (RuntimeException e) { |
70 |
throw new InvalidXPathException( text ); |
73 |
throw new InvalidXPathException( text ); |