Class XalanUtil


  • public class XalanUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      XalanUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.Object coerceToJava​(org.apache.xpath.objects.XObject xo)
      Return the Java value corresponding to an XPath result.
      static org.apache.xpath.XPathContext getContext​(javax.servlet.jsp.tagext.Tag child, javax.servlet.jsp.PageContext pageContext)
      Return the XPathContext to be used for evaluating expressions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XalanUtil

        public XalanUtil()
    • Method Detail

      • getContext

        public static org.apache.xpath.XPathContext getContext​(javax.servlet.jsp.tagext.Tag child,
                                                               javax.servlet.jsp.PageContext pageContext)
        Return the XPathContext to be used for evaluating expressions. If the child is nested withing a forEach tag its iteration context is used. Otherwise, a new context is created based on an empty Document.
        Parameters:
        child - the tag whose context should be returned
        pageContext - the current page context
        Returns:
        the XPath evaluation context
      • coerceToJava

        static java.lang.Object coerceToJava​(org.apache.xpath.objects.XObject xo)
                                      throws javax.xml.transform.TransformerException
        Return the Java value corresponding to an XPath result.
        Parameters:
        xo - the XPath type
        Returns:
        the corresponding Java value per the JSTL mapping rules
        Throws:
        javax.xml.transform.TransformerException - if there was a problem converting the type