public javax.xml.xpath.XPath newXPath() { return new org.apache.taglibs.standard.tag.common.xml.JSTLXPathImpl(null, null); } }
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, Document document = getParser().parse( source ); XObject resultObject = eval( expression, document ); return getResultAsType( resultObject, returnType ); } catch ( SAXException e ) { throw new XPathExpressionException ( e );
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, XObject resultObject = eval( expression, item ); return getResultAsType( resultObject, returnType ); } catch ( java.lang.NullPointerException npe ) {
private static Document getDummyDocument( ) { // we don't need synchronization here; even if two threads // enter this code at the same time, we just waste a little time if(d==null) { DOMImplementation dim = getParser().getDOMImplementation(); d = dim.createDocument("http://java.sun.com/jaxp/xpath", "dummyroot", null); } return d; }
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, Document document = getParser().parse( source ); XObject resultObject = eval( expression, document ); return getResultAsType( resultObject, returnType ); } catch ( SAXException e ) { throw new XPathExpressionException ( e );
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, XObject resultObject = eval( expression, item ); return getResultAsType( resultObject, returnType ); } catch ( java.lang.NullPointerException npe ) {
private static Document getDummyDocument( ) { // we don't need synchronization here; even if two threads // enter this code at the same time, we just waste a little time if(d==null) { DOMImplementation dim = getParser().getDOMImplementation(); d = dim.createDocument("http://java.sun.com/jaxp/xpath", "dummyroot", null); } return d; }
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, Document document = getParser().parse( source ); XObject resultObject = eval( expression, document ); return getResultAsType( resultObject, returnType ); } catch ( SAXException e ) { throw new XPathExpressionException ( e );
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, XObject resultObject = eval( expression, item ); return getResultAsType( resultObject, returnType ); } catch ( java.lang.NullPointerException npe ) {
/** * <p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> * and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, InputSource source, QName returnType)} with a * <code>returnType</code> of {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If <code>expression</code> or <code>source</code> is <code>null</code>, * then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param source The <code>InputSource</code> of the document to evaluate over. * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If expression cannot be evaluated. * @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>. */ public String evaluate(String expression, InputSource source) throws XPathExpressionException { return (String)this.evaluate( expression, source, XPathConstants.STRING ); }
public javax.xml.xpath.XPath newXPath() { return new org.apache.taglibs.standard.tag.common.xml.JSTLXPathImpl(null, null); } }
private static Document getDummyDocument( ) { // we don't need synchronization here; even if two threads // enter this code at the same time, we just waste a little time if(d==null) { DOMImplementation dim = getParser().getDOMImplementation(); d = dim.createDocument("http://java.sun.com/jaxp/xpath", "dummyroot", null); } return d; }
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, Document document = getParser().parse( source ); XObject resultObject = eval( expression, document ); return getResultAsType( resultObject, returnType ); } catch ( SAXException e ) { throw new XPathExpressionException ( e );
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, XObject resultObject = eval( expression, item ); return getResultAsType( resultObject, returnType ); } catch ( java.lang.NullPointerException npe ) {
/** * <p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> * * <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of * {@link XPathConstants#STRING}.</p> * * <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec * for context item evaluation, * variable, function and QName resolution and return type conversion.</p> * * <p>If a <code>null</code> value is provided for * <code>item</code>, an empty document will be used for the * context. * If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p> * * @param expression The XPath expression. * @param item The starting context (node or node list, for example). * * @return The <code>String</code> that is the result of evaluating the expression and * converting the result to a <code>String</code>. * * @throws XPathExpressionException If <code>expression</code> cannot be evaluated. * @throws NullPointerException If <code>expression</code> is <code>null</code>. */ public String evaluate(String expression, Object item) throws XPathExpressionException { return (String)this.evaluate( expression, item, XPathConstants.STRING ); }
public javax.xml.xpath.XPath newXPath() { return new org.apache.taglibs.standard.tag.common.xml.JSTLXPathImpl(null, null); } }
private static Document getDummyDocument( ) { // we don't need synchronization here; even if two threads // enter this code at the same time, we just waste a little time if(d==null) { DOMImplementation dim = getParser().getDOMImplementation(); d = dim.createDocument("http://java.sun.com/jaxp/xpath", "dummyroot", null); } return d; }
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, Document document = getParser().parse( source ); XObject resultObject = eval( expression, document ); return getResultAsType( resultObject, returnType ); } catch ( SAXException e ) { throw new XPathExpressionException ( e );
if ( !isSupported ( returnType ) ) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_UNSUPPORTED_RETURN_TYPE, XObject resultObject = eval( expression, item ); return getResultAsType( resultObject, returnType ); } catch ( java.lang.NullPointerException npe ) {