SCD for schema is what XPath is for XML. SCD allows you to select a schema component(s) from a schema component(s).
See XML Schema: Component Designators. This implementation is based on 03/29/2005 working draft.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static SCD | create(String
the string representation of SCD, such as "/foo/bar". path, NamespaceContext Its nsContext)NamespaceContext#getNamespaceURI(String) is used
to resolve prefixes in the SCD to the namespace URI.Parses the string representation of SCD. |
| public final Collection | Returns: could be empty but never be null.Evaluates the SCD against the given context node and returns the matched nodes. |
| public final Collection | Returns: could be empty but never be null.Evaluates the SCD against the whole schema and returns the matched nodes. |
| public abstract Iterator | Returns: could be empty but never be null.XSComponents that represent the context node against
which is evaluated.Evaluates the SCD against the given set of context nodes and returns the matched nodes. |
| public final Collection | Returns: could be empty but never be null.XSComponents that represent the context node against
which is evaluated.Evaluates the SCD against the given set of context nodes and returns the matched nodes. |
| public final XSComponent | Returns: null if the SCD didn't match anything. If the SCD matched more than one node, the first one will be returned.Evaluates the SCD against the given context node and returns the matched node. |
| public final XSComponent | Returns: null if the SCD didn't match anything. If the SCD matched more than one node, the first one will be returned.Evaluates the SCD against the whole schema set and returns the matched node. |
| private static ParseException | |
| public abstract String | toString()
Overrides java. Returns the textual SCD representation as given to |
| SCD | back to summary |
|---|---|
| protected SCD() Default constructor. | |
| create | back to summary |
|---|---|
| public static SCD create(String path, NamespaceContext nsContext) throws ParseException Parses the string representation of SCD. This method involves parsing the path expression and preparing the in-memory structure, so this is useful when you plan to use the same SCD against different context node multiple times.
If you want to evaluate SCD just once, use
| |
| select | back to summary |
|---|---|
| public final Collection Evaluates the SCD against the given context node and returns the matched nodes.
| |
| select | back to summary |
|---|---|
| public final Collection Evaluates the SCD against the whole schema and returns the matched nodes.
This method is here because
| |
| select | back to summary |
|---|---|
| public abstract Iterator Evaluates the SCD against the given set of context nodes and returns the matched nodes.
| |
| select | back to summary |
|---|---|
| public final Collection Evaluates the SCD against the given set of context nodes and returns the matched nodes.
| |
| selectSingle | back to summary |
|---|---|
| public final XSComponent selectSingle(XSComponent contextNode) Evaluates the SCD against the given context node and returns the matched node.
| |
| selectSingle | back to summary |
|---|---|
| public final XSComponent selectSingle(XSSchemaSet contextNode) Evaluates the SCD against the whole schema set and returns the matched node.
| |
| setCause | back to summary |
|---|---|
| private static ParseException setCause(ParseException e, Throwable x) | |
| toString | back to summary |
|---|---|
| public abstract String toString() Overrides java. Returns the textual SCD representation as given to | |