org.apache.xerces.impl.xs.alternative

## Class Test

- java.lang.Object
- - org.apache.xerces.impl.xs.AbstractXPath2EngineImpl
  - - org.apache.xerces.impl.xs.alternative.Test

-     public class Test
      extends AbstractXPath2EngineImpl

  Representation of XML Schema 1.1 'type alternatives', "test" attribute.
  Version:
    $Id: Test.java 1890307 2021-05-29 09:07:37Z mukulg $
  Author:
    Hiranya Jayathilaka, University of Moratuwa, Mukul Gandhi IBM

  # INTERNAL:

    Usage of this class is not supported. It may be altered or removed at any time.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.eclipse.wst.xml.xpath2.processor.ast.XPath` | `fEclipseXPathImpl` XPath 2.0 expression.
    `protected java.lang.String` | `fExpression` String representation of the XPath
    `protected XSTypeAlternativeImpl` | `fTypeAlternative` The type alternative to which the test belongs
    `protected XPath20` | `fXPath` Xerces-J native XPath 2.0 subset expression object.
    `protected NamespaceSupport` | `fXPath2NamespaceContext` XPath 2.0 namespace context.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Test(XPath20 xpath, XSTypeAlternativeImpl typeAlternative, NamespaceSupport namespaceContext)` Constructs a "test" for type alternatives
    `Test(org.eclipse.wst.xml.xpath2.processor.ast.XPath xpath, java.lang.String expression, XSTypeAlternativeImpl typeAlternative, NamespaceSupport namespaceContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `evaluateTest(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.NamespaceContext instanceNamespaceContext, java.lang.String expandedSystemId)` Evaluate the test expression with respect to the specified element and its attributes
    `NamespaceSupport` | `getNamespaceContext()`
    `XSTypeAlternativeImpl` | `getTypeAlternative()`
    `java.lang.Object` | `getXPath()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.xerces.impl.xs.AbstractXPath2EngineImpl

      `addNamespaceBindingToXPath2DynamicContext, compileXPathStr, evaluateXPathExpr, initXPath2DynamicContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### fTypeAlternative

          protected final XSTypeAlternativeImpl fTypeAlternative

      The type alternative to which the test belongs

    - #### fExpression

          protected final java.lang.String fExpression

      String representation of the XPath

    - #### fXPath

          protected final XPath20 fXPath

      Xerces-J native XPath 2.0 subset expression object.

    - #### fEclipseXPathImpl

          protected final org.eclipse.wst.xml.xpath2.processor.ast.XPath fEclipseXPathImpl

      XPath 2.0 expression. Eclipse XPath 2.0 expression object.

    - #### fXPath2NamespaceContext

          protected final NamespaceSupport fXPath2NamespaceContext

      XPath 2.0 namespace context. Derived from XSDocumentInfo in XSD traversers.

  - ### Constructor Detail

    - #### Test

          public Test(XPath20 xpath,
              XSTypeAlternativeImpl typeAlternative,
              NamespaceSupport namespaceContext)

      Constructs a "test" for type alternatives

    - #### Test

          public Test(org.eclipse.wst.xml.xpath2.processor.ast.XPath xpath,
              java.lang.String expression,
              XSTypeAlternativeImpl typeAlternative,
              NamespaceSupport namespaceContext)

  - ### Method Detail

    - #### getNamespaceContext

          public NamespaceSupport getNamespaceContext()

    - #### getTypeAlternative

          public XSTypeAlternativeImpl getTypeAlternative()

    - #### getXPath

          public java.lang.Object getXPath()

    - #### evaluateTest

          public boolean evaluateTest(org.apache.xerces.xni.QName element,
                             org.apache.xerces.xni.XMLAttributes attributes,
                             org.apache.xerces.xni.NamespaceContext instanceNamespaceContext,
                             java.lang.String expandedSystemId)

      Evaluate the test expression with respect to the specified element and its attributes

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.