1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.xml.transform.dom;
  6. import javax.xml.transform.SourceLocator;
  7. import org.w3c.dom.Node;
  8. /**
  9. * Indicates the position of a node in a source DOM, intended
  10. * primarily for error reporting. To use a DOMLocator, the receiver of an
  11. * error must downcast the {@link javax.xml.transform.SourceLocator}
  12. * object returned by an exception. A {@link javax.xml.transform.Transformer}
  13. * may use this object for purposes other than error reporting, for instance,
  14. * to indicate the source node that originated a result node.
  15. */
  16. public interface DOMLocator extends SourceLocator {
  17. /**
  18. * Return the node where the event occurred.
  19. *
  20. * @return The node that is the location for the event.
  21. */
  22. public Node getOriginatingNode();
  23. }