jd.xml.xslt.extension
Class JavaXsltContext

java.lang.Object
  extended byjd.xml.xslt.extension.JavaXsltContext
All Implemented Interfaces:
XSLTContext

public class JavaXsltContext
extends Object
implements XSLTContext

A wrapper around a jd.xml.xslt.XsltContext to provide an org.w3c.xsl.XSLTContext to a Java extension function. Since DOM is not used to implement the XPath tree model, the DOM-related methods are not supported and will throw an exception when called. However one can still cast the XSLTContext to a JavaXsltContext and access the current node and context node as genuine XPathNode objects.


Constructor Summary
JavaXsltContext(XsltContext context)
           
 
Method Summary
 Node getContextNode()
          Throws an expection since the XPath model used by jd.xslt is not a DOM model.
 int getContextPosition()
          Returns the context position from the XPath expression context.
 int getContextSize()
          Returns the context size from the XPath expression context.
 Node getCurrentNode()
          Throws an expection since the XPath model used by jd.xslt is not a DOM model Use getXpCurrentNode instead.
 Document getOwnerDocument()
          Throws an expection since the XPath model used by jd.xslt is not a DOM model
 XPathNode getXpContextNode()
          Return the context node.
 XPathNode getXpCurrentNode()
          Return the current node.
 String stringValue(Node node)
          Throws an expection since the XPath model used by jd.xslt is not a DOM model Use XPathNode.getXpValue() instead.
 Object systemProperty(String namespaceURI, String localName)
          Returns an Object representing the value of the system property whose expanded-name has the specified namespace URI and local part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaXsltContext

public JavaXsltContext(XsltContext context)
Method Detail

systemProperty

public Object systemProperty(String namespaceURI,
                             String localName)
Description copied from interface: XSLTContext
Returns an Object representing the value of the system property whose expanded-name has the specified namespace URI and local part.

Specified by:
systemProperty in interface XSLTContext

getContextPosition

public int getContextPosition()
Description copied from interface: XSLTContext
Returns the context position from the XPath expression context.

Specified by:
getContextPosition in interface XSLTContext

getContextSize

public int getContextSize()
Description copied from interface: XSLTContext
Returns the context size from the XPath expression context.

Specified by:
getContextSize in interface XSLTContext

getContextNode

public Node getContextNode()
                    throws IllegalStateException
Throws an expection since the XPath model used by jd.xslt is not a DOM model. Use getXpContextNode instead.

Specified by:
getContextNode in interface XSLTContext
Throws:
IllegalStateException
See Also:
getXpContextNode()

getXpContextNode

public XPathNode getXpContextNode()
Return the context node.


getCurrentNode

public Node getCurrentNode()
                    throws IllegalStateException
Throws an expection since the XPath model used by jd.xslt is not a DOM model Use getXpCurrentNode instead.

Specified by:
getCurrentNode in interface XSLTContext
Throws:
IllegalStateException
See Also:
getXpCurrentNode()

getXpCurrentNode

public XPathNode getXpCurrentNode()
Return the current node.


getOwnerDocument

public Document getOwnerDocument()
                          throws IllegalStateException
Throws an expection since the XPath model used by jd.xslt is not a DOM model

Specified by:
getOwnerDocument in interface XSLTContext
Throws:
IllegalStateException

stringValue

public String stringValue(Node node)
                   throws IllegalStateException
Throws an expection since the XPath model used by jd.xslt is not a DOM model Use XPathNode.getXpValue() instead.

Specified by:
stringValue in interface XSLTContext
Throws:
IllegalStateException
See Also:
jd.xml.xpath.model.XPathNode#getXpValue