|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xerces.xinclude.XIncludeHandler org.apache.xerces.xpointer.XPointerHandler
public final class XPointerHandler
This is a pipeline component which extends the XIncludeHandler to perform XPointer specific processing specified in the W3C XPointerFramework and element() Scheme Recommendations.
This component analyzes each event in the pipeline, looking for an element that matches a PointerPart in the parent XInclude element's xpointer attribute value. If the match succeeds, all children are passed by this component.
See the XPointer Framework Recommendation for more information on the XPointer Framework and ShortHand Pointers. See the XPointer element() Scheme Recommendation for more information on the XPointer element() Scheme.
Field Summary |
---|
Fields inherited from class org.apache.xerces.xinclude.XIncludeHandler |
---|
CURRENT_BASE_URI, HTTP_ACCEPT, HTTP_ACCEPT_LANGUAGE, XINCLUDE_ATTR_ACCEPT, XINCLUDE_ATTR_ACCEPT_LANGUAGE, XINCLUDE_ATTR_ENCODING, XINCLUDE_ATTR_HREF, XINCLUDE_ATTR_PARSE, XINCLUDE_DEFAULT_CONFIGURATION, XINCLUDE_FALLBACK, XINCLUDE_INCLUDE, XINCLUDE_INCLUDED, XINCLUDE_NS_URI, XINCLUDE_PARSE_TEXT, XINCLUDE_PARSE_XML, XPOINTER |
Fields inherited from interface org.apache.xerces.xpointer.XPointerProcessor |
---|
EVENT_ELEMENT_EMPTY, EVENT_ELEMENT_END, EVENT_ELEMENT_START |
Fields inherited from interface org.apache.xerces.xni.XMLDTDHandler |
---|
CONDITIONAL_IGNORE, CONDITIONAL_INCLUDE |
Constructor Summary | |
---|---|
XPointerHandler()
|
|
XPointerHandler(SymbolTable symbolTable,
XMLErrorHandler errorHandler,
XMLErrorReporter errorReporter)
|
Method Summary | |
---|---|
void |
characters(XMLString text,
Augmentations augs)
Character content. |
void |
comment(XMLString text,
Augmentations augs)
If the comment is a child of a matched element, then pass else return. |
void |
emptyElement(QName element,
XMLAttributes attributes,
Augmentations augs)
An empty element. |
void |
endCDATA(Augmentations augs)
The end of a CDATA section. |
void |
endElement(QName element,
Augmentations augs)
The end of an element. |
java.util.Vector |
getPointerParts()
Returns a Vector of XPointerPart objects |
XPointerPart |
getXPointerPart()
Returns the pointer part used to resolve the document fragment. |
void |
ignorableWhitespace(XMLString text,
Augmentations augs)
Ignorable whitespace. |
boolean |
isChildFragmentResolved()
Returns true if the XPointer expression resolves to a non-element child of the current resource fragment. |
boolean |
isFragmentResolved()
Returns true if the Node fragment is resolved. |
boolean |
isXPointerResolved()
Returns true if the XPointer successfully found a sub-resource . |
void |
parseXPointer(java.lang.String xpointer)
Parses the XPointer framework expression and delegates scheme specific parsing. |
void |
processingInstruction(java.lang.String target,
XMLString data,
Augmentations augs)
A processing instruction. |
boolean |
resolveXPointer(QName element,
XMLAttributes attributes,
Augmentations augs,
int event)
Evaluates an XML resource with respect to an XPointer expressions by checking if it's element and attributes parameters match the criteria specified in the xpointer expression. |
void |
setDocumentHandler(XMLDocumentHandler handler)
Sets the document handler. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Sets the value of a property. |
void |
startCDATA(Augmentations augs)
The start of a CDATA section. |
void |
startElement(QName element,
XMLAttributes attributes,
Augmentations augs)
The start of an element. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPointerHandler()
public XPointerHandler(SymbolTable symbolTable, XMLErrorHandler errorHandler, XMLErrorReporter errorReporter)
Method Detail |
---|
public void setDocumentHandler(XMLDocumentHandler handler)
XMLDocumentSource
setDocumentHandler
in interface XMLDocumentSource
setDocumentHandler
in class XIncludeHandler
public void parseXPointer(java.lang.String xpointer) throws XNIException
parseXPointer
in interface XPointerProcessor
xpointer
- A String representing the xpointer expression.
XNIException
- Thrown if the xpointer string does not conform to
the XPointer Framework syntax or the syntax of the pointer part does
not conform to its definition for its scheme.XPointerProcessor.parseXPointer(java.lang.String)
public boolean resolveXPointer(QName element, XMLAttributes attributes, Augmentations augs, int event) throws XNIException
XPointerProcessor
resolveXPointer
in interface XPointerProcessor
element
- - The name of the element.attributes
- - The element attributes.augs
- - Additional information that may include infoset augmentationsevent
- - An integer indicating
0 - The start of an element
1 - The end of an element
2 - An empty element call
XNIException
- Thrown to signal an errorXPointerProcessor.resolveXPointer(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations, int event)
public boolean isFragmentResolved() throws XNIException
isFragmentResolved
in interface XPointerProcessor
XNIException
- Thrown to signal an errorXPointerProcessor.isFragmentResolved()
public boolean isChildFragmentResolved() throws XNIException
XNIException
XPointerPart.isChildFragmentResolved()
public boolean isXPointerResolved() throws XNIException
isXPointerResolved
in interface XPointerProcessor
XNIException
- Thrown to signal an errorXPointerProcessor.isFragmentResolved()
public XPointerPart getXPointerPart()
public java.util.Vector getPointerParts()
public void comment(XMLString text, Augmentations augs) throws XNIException
comment
in interface XMLDocumentHandler
comment
in interface XMLDTDHandler
comment
in class XIncludeHandler
text
- The text in the comment.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by application to signal an error.public void processingInstruction(java.lang.String target, XMLString data, Augmentations augs) throws XNIException
Typically, a processing instruction's data will contain a series of pseudo-attributes. These pseudo-attributes follow the form of element attributes but are not parsed or presented to the application as anything other than text. The application is responsible for parsing the data.
processingInstruction
in interface XMLDocumentHandler
processingInstruction
in interface XMLDTDHandler
processingInstruction
in class XIncludeHandler
target
- The target.data
- The data or null if none specified.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException
startElement
in interface XMLDocumentHandler
startElement
in class XIncludeHandler
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException
emptyElement
in interface XMLDocumentHandler
emptyElement
in class XIncludeHandler
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void characters(XMLString text, Augmentations augs) throws XNIException
characters
in interface XMLDocumentHandler
characters
in class XIncludeHandler
text
- The content.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException
ignorableWhitespace
in interface XMLDocumentHandler
ignorableWhitespace
in class XIncludeHandler
text
- The ignorable whitespace.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void endElement(QName element, Augmentations augs) throws XNIException
endElement
in interface XMLDocumentHandler
endElement
in class XIncludeHandler
element
- The name of the element.augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void startCDATA(Augmentations augs) throws XNIException
startCDATA
in interface XMLDocumentHandler
startCDATA
in class XIncludeHandler
augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void endCDATA(Augmentations augs) throws XNIException
endCDATA
in interface XMLDocumentHandler
endCDATA
in class XIncludeHandler
augs
- Additional information that may include infoset augmentations
XNIException
- Thrown by handler to signal an error.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws XMLConfigurationException
Sets the value of a property. This method is called by the component manager any time after reset when a property changes value.
Note: Components should silently ignore properties that do not affect the operation of the component.
setProperty
in interface XMLComponent
setProperty
in class XIncludeHandler
propertyId
- The property identifier.value
- The value of the property.
XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |