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.
fErrorHandler
protected org.apache.xerces.xni.parser.XMLErrorHandler fErrorHandler
fFixupBase
protected boolean fFixupBase
fFixupLang
protected boolean fFixupLang
fFoundMatchingPtrPart
protected boolean fFoundMatchingPtrPart
fIsXPointerResolved
protected boolean fIsXPointerResolved
fXPointerParts
protected Vector fXPointerParts
characters
public void characters(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
Character content.
- characters in interface org.apache.xerces.xni.XMLDocumentHandler
- characters in interface XIncludeHandler
text
- The content.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
comment
public void comment(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
If the comment is a child of a matched element, then pass else return.
- comment in interface org.apache.xerces.xni.XMLDocumentHandler
- comment in interface org.apache.xerces.xni.XMLDTDHandler
- comment in interface XIncludeHandler
text
- The text in the comment.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by application to signal an error.
emptyElement
public void emptyElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
An empty element.
- emptyElement in interface org.apache.xerces.xni.XMLDocumentHandler
- emptyElement in interface XIncludeHandler
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
endCDATA
public void endCDATA(org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
The end of a CDATA section.
- endCDATA in interface org.apache.xerces.xni.XMLDocumentHandler
- endCDATA in interface XIncludeHandler
augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
endElement
public void endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
The end of an element.
- endElement in interface org.apache.xerces.xni.XMLDocumentHandler
- endElement in interface XIncludeHandler
element
- The name of the element.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
getPointerParts
public Vector getPointerParts()
Returns a Vector of XPointerPart objects
- A Vector of XPointerPart objects.
getXPointerPart
public XPointerPart getXPointerPart()
Returns the pointer part used to resolve the document fragment.
- String - The pointer part used to resolve the document fragment.
ignorableWhitespace
public void ignorableWhitespace(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
Ignorable whitespace. For this method to be called, the document
source must have some way of determining that the text containing
only whitespace characters should be considered ignorable. For
example, the validator can determine if a length of whitespace
characters in the document are ignorable based on the element
content model.
- ignorableWhitespace in interface org.apache.xerces.xni.XMLDocumentHandler
- ignorableWhitespace in interface XIncludeHandler
text
- The ignorable whitespace.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
init
protected void init()
Initializes the XPointer Processor;
initErrorReporter
protected void initErrorReporter()
Initializes error handling objects
isChildFragmentResolved
public boolean isChildFragmentResolved()
throws org.apache.xerces.xni.XNIException
Returns true if the XPointer expression resolves to a non-element child
of the current resource fragment.
isFragmentResolved
public boolean isFragmentResolved()
throws org.apache.xerces.xni.XNIException
Returns true if the Node fragment is resolved.
- isFragmentResolved in interface XPointerProcessor
isXPointerResolved
public boolean isXPointerResolved()
throws org.apache.xerces.xni.XNIException
Returns true if the XPointer successfully found a sub-resource .
- isXPointerResolved in interface XPointerProcessor
parseXPointer
public void parseXPointer(String xpointer)
throws org.apache.xerces.xni.XNIException
Parses the XPointer framework expression and delegates scheme specific parsing.
- parseXPointer in interface XPointerProcessor
org.apache.xerces.xpointer.XPointerProcessor.parseXPointer(java.lang.String)
processingInstruction
public void processingInstruction(String target,
org.apache.xerces.xni.XMLString data,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
A processing instruction. Processing instructions consist of a
target name and, optionally, text data. The data is only meaningful
to the application.
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 org.apache.xerces.xni.XMLDocumentHandler
- processingInstruction in interface org.apache.xerces.xni.XMLDTDHandler
- processingInstruction in interface XIncludeHandler
target
- The target.data
- The data or null if none specified.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
resolveXPointer
public boolean resolveXPointer(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs,
int event)
throws org.apache.xerces.xni.XNIException
- resolveXPointer in interface XPointerProcessor
org.apache.xerces.xpointer.XPointerProcessor.resolveXPointer(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations, int event)
setProperty
public void setProperty(String propertyId,
Object value)
throws org.apache.xerces.xni.parser.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 org.apache.xerces.xni.parser.XMLComponent
- setProperty in interface XIncludeHandler
propertyId
- The property identifier.value
- The value of the property.
org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.
startCDATA
public void startCDATA(org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
The start of a CDATA section.
- startCDATA in interface org.apache.xerces.xni.XMLDocumentHandler
- startCDATA in interface XIncludeHandler
augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.
startElement
public void startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
The start of an element.
- startElement in interface org.apache.xerces.xni.XMLDocumentHandler
- startElement in interface XIncludeHandler
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentations
org.apache.xerces.xni.XNIException
- Thrown by handler to signal an error.