Class IDElementLocator

java.lang.Object
ro.sync.ecss.extensions.api.link.ElementLocator
ro.sync.ecss.extensions.commons.IDElementLocator
Direct Known Subclasses:
DITAIDElementLocator, XHTMLElementLocator

@API(type=INTERNAL, src=PUBLIC) public class IDElementLocator extends ElementLocator
Implementation of an ElementLocator that locates elements based on a given link and checks if the attribute with the type ID matches the provided link.
  • Field Details

    • idVerifier

      protected IDTypeVerifier idVerifier
      Class used to check if an attribute has ID type.
  • Constructor Details

    • IDElementLocator

      public IDElementLocator(IDTypeVerifier idVerifier, String link)
      Constructor.
      Parameters:
      idVerifier - Used to check if an attribute has ID type.
      link - The link used to identify an element.
  • Method Details

    • endElement

      public void endElement(String uri, String localName, String name)
      Description copied from class: ElementLocator
      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 every endElement (even when the element is empty).
      Specified by:
      endElement in class ElementLocator
      Parameters:
      uri - the namespace URI, or the empty string if the element has no namespace URI or if namespace processing is not being performed
      localName - the local name of the element
      name - the qualified XML name of the element
      See Also:
    • startElement

      public boolean startElement(String uri, String localName, String name, Attr[] atts)
      Description copied from class: ElementLocator
      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 every startElement (even when the element is empty).
      Specified by:
      startElement in class ElementLocator
      Parameters:
      uri - the namespace URI, or the empty string if the element has no namespace URI or if namespace processing is not being performed
      localName - the local name of the element
      name - the qualified name of the element
      atts - an array with the attributes attached to the element. If there are no attributes, it shall be empty. The attributes are represented as Attr objects.
      Returns:
      true if the current element is indicated by the link.
      See Also: