|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.jaxme.xs.XPathMatcher
public final class XPathMatcher
An XPath matcher. Implements the restricted subset of XPath as defined by the XML Schema.
Method Summary | |
---|---|
XSElementOrAttrRef[] |
match(XSElement startingNode)
Return the elements and attributes matched by this xpath when applied from the specified starting node. |
void |
match(XSElement startingNode,
java.util.Set matches)
Return the elements and attributes matched by this xpath when applied from the specified starting node. |
static XSElementOrAttrRef[][] |
match(XsTKeybase keybase,
XSElement startingNode)
Matches every element and attribute referenced by the specified keybase. |
static XPathMatcher |
parse(org.xml.sax.Locator locator,
java.lang.String xpath,
boolean elementsOnly)
Create an XPathMatcher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static XSElementOrAttrRef[][] match(XsTKeybase keybase, XSElement startingNode) throws org.xml.sax.SAXException
The result is a two dimensional array, the first dimension corresponds to each xs:field used to declare the constraint. The second dimension is for each 'or' used within the fields xpath query.
Only tags and attributes that were matched by the xpath will be in the result, any xpath that fails to match anything will not be stored in this array.
org.xml.sax.SAXException
public static XPathMatcher parse(org.xml.sax.Locator locator, java.lang.String xpath, boolean elementsOnly) throws org.xml.sax.SAXException
elementsOnly
- True if the xpath is not allowed to match attributes.
org.xml.sax.SAXException
public XSElementOrAttrRef[] match(XSElement startingNode) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void match(XSElement startingNode, java.util.Set matches) throws org.xml.sax.SAXException
org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |