com.rsa.certj.xml

Class XPointerHandler

java.lang.Object
  |
  +--com.rsa.certj.xml.XPointerHandler

public class XPointerHandler
extends Object

This class implements XPointer operation. The supported XPointer functions include: "#xpointer(/)" and "#xpointer(id("ID"))". The result of XPointer processing is a node-set derived from the resultant location-set as follows:

  1. Discard point nodes.
  2. Replace each range node with all XPath nodes having full or partial content within the range.
  3. Replace the root node with its children (if it is in the node-set).
  4. Replace any element node E with E plus all descendants of E (text, comment, PI, element) and all namespace and attribute nodes of E and its descendant elements.
  5. If the URI is not a full XPointer, then delete all comment nodes.

Copyright © RSA Security Inc., 2001-2002. All rights reserved.


Constructor Summary

XPointerHandler()

 

 

Method Summary

static org.w3c.dom.NodeList

processXPointer(org.w3c.dom.Node document, String xptr)

This method processes the XPointer and returns the result as a node-set.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPointerHandler

public XPointerHandler()
Method Detail

processXPointer

public static org.w3c.dom.NodeList processXPointer(org.w3c.dom.Node document,
                                                   String xptr)
                                            throws XMLException
This method processes the XPointer and returns the result as a node-set. If the result is an empty node-set, then an XMLException is thrown.

Parameters

         document  

A Node object that is the root node of an XML document will be used as the XPointer evaluation context.

         xptr  

A String object that contains the XPointer evaluation expression.

Returns

A NodeList object that contains the result node-set dereferenced by the XPointer expression.

Throws

XMLException - If an error occured during XPointer processing, such as the expresion is not valid or the XPointer results in an empty node-set.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000