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