COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.reference
Class XPointer

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.reference.XPointer

public class XPointer
extends java.lang.Object

This class compiles an XPointer expression and flags any syntactical errors that are detected. This is a limited implementation of the XPointer standard as required by the W3C recommnedation. The SML specification does not require a full implementation of the XPointer standard.


Constructor Summary
XPointer()
           
 
Method Summary
static XPointerExpression compile(java.lang.String expression)
          Compiles an XPointer expression and returns an instance of XPointerExpression which can be used to evaluate the expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPointer

public XPointer()
Method Detail

compile

public static XPointerExpression compile(java.lang.String expression)
                                  throws XPointerSyntaxException
Compiles an XPointer expression and returns an instance of XPointerExpression which can be used to evaluate the expression.

Parameters:
expression - The string representation of the XPointer expression. The expression is expected to take one of the following formats:
  • Full XPointer: The expression is assumed to be a full XPointer if it contains an unescaped bracket; otherwise
  • Child Sequence: The expression is assumed to be a child sequence if it contains an unescaped forward slash ('/'); otherwise
  • Bare Name: The express is assumed to be a bare name
Returns:
An instance of XPointerExpression which can be used to evaluate the XPointer expression.
Throws:
XPointerSyntaxException - If syntax error is detected

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification