## com.saxonica.schema
Class IdentitySelector

    java.lang.Object
      com.saxonica.schema.SchemaStructure
          com.saxonica.schema.IdentitySelector

All Implemented Interfaces:
  Serializable, SourceLocator

    public class IdentitySelector

extends SchemaStructure

The selector of an IdentityConstraint

See Also:
  Serialized Form

Constructor Summary
`IdentitySelector(String xpath)` Create a new IdentitySelector.

Method Summary
`NamespaceResolver` `getNamespaceContext()` Get the namespace context for evaluating the XPath expression
`Pattern` `getSelection()` Return the compiled XPath expression
`String` `getXPath()` Return the source XPath expression of this IdentitySelector.
`String` `getXPathDefaultNamespace()` Get the XPath default namespace
`void` `setNamespaceContext(NamespaceResolver resolver)` Set the namespace context.
`void` `setSelection(Pattern selection)` Set the compiled XPath expression
`void` `setXPath(String xpath)` Sets the XPath expression for this Selector.
`void` `setXPathDefaultNamespace(String uri)` Set the XPath default namespace

Methods inherited from class com.saxonica.schema.SchemaStructure
`elaborate, fixup, getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus`

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

Constructor Detail

### IdentitySelector

    public IdentitySelector(String xpath)
                     throws SchemaException

  Create a new IdentitySelector.

  Parameters:
    `xpath` - the xpath for the IdentitySelector. Must not be null.
  Throws:
    `SchemaException` - if xpath is null.

Method Detail

### getXPath

    public String getXPath()

  Return the source XPath expression of this IdentitySelector.

  Returns:
    the XPath expression defined in this IdentitySelector.

### getSelection

    public Pattern getSelection()

  Return the compiled XPath expression

  Returns:
    the expression as a Selector object

### setXPath

    public void setXPath(String xpath)
                  throws SchemaException

  Sets the XPath expression for this Selector.

  Parameters:
    `xpath` - the XPath expression for this IdentitySelector. Must not be null.
  Throws:
    `SchemaException` - if xpath is null.

### setSelection

    public void setSelection(Pattern selection)

  Set the compiled XPath expression

  Parameters:
    `selection` -

### setNamespaceContext

    public void setNamespaceContext(NamespaceResolver resolver)

  Set the namespace context. This is needed to allow the assertion to be serialized, so that the namespace context can be replicated when it is reloaded.

### getNamespaceContext

    public NamespaceResolver getNamespaceContext()

  Get the namespace context for evaluating the XPath expression

### setXPathDefaultNamespace

    public void setXPathDefaultNamespace(String uri)

  Set the XPath default namespace

  Parameters:
    `uri` - the XPath default namespace

### getXPathDefaultNamespace

    public String getXPathDefaultNamespace()

  Get the XPath default namespace

  Returns:
    the XPath default namespace

Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.