Package ro.sync.ecss.extensions.api.link
Class ElementLocator
java.lang.Object
ro.sync.ecss.extensions.api.link.ElementLocator
- Direct Known Subclasses:
DITAElementLocator
,DITAMapKeyDefElementLocator
,IDElementLocator
,XPointerElementLocator
Base class for custom elements locators used to locate
an element based on a link.
The source XML is parsed and notifications will be forwarded
to ElementLocator objects in order for the references to be resolved.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
endElement
(String uri, String localName, String qName) Notification received when the end of an element has been encountered.abstract boolean
startElement
(String uri, String localName, String qName, Attr[] atts) Notification received when the beginning of an element has been encountered.
-
Field Details
-
link
The link to be used to identify the element.
-
-
Constructor Details
-
ElementLocator
Constructor.- Parameters:
link
- The link to be used to identify the element.
-
-
Method Details
-
startElement
Notification received when the beginning of an element has been encountered. This method is invoked at the beginning of every element in the XML document; an event will be fired for everystartElement
(even when the element is empty).- Parameters:
uri
- the namespace URI, or the empty string if the element has no namespace URI or if namespace processing is not being performedlocalName
- the local name of the elementqName
- the qualified name of the elementatts
- an array with the attributes attached to the element. If there are no attributes, it shall be empty. The attributes are represented asAttr
objects.- Returns:
true
if the current element is indicated by the link.
-
endElement
Notification received when the end of an element has been encountered. This method is invoked at the end of every element in the XML document; an event will be fired for everyendElement
(even when the element is empty).- Parameters:
uri
- the namespace URI, or the empty string if the element has no namespace URI or if namespace processing is not being performedlocalName
- the local name of the elementqName
- the qualified XML name of the element
-