Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6684227

JAXP issue 49 : Support dom/current-element-node property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 7
    • xml
    • 1.4
    • generic
    • generic
    • Verified

        There is the property http://apache.org/xml/properties/dom/current-element-node
        which is very useful for determining error node during validation.
        com.sun.org.apache.xerces.internal.impl.Constants.java has its definition but
        comparing to original Xerces impl the
        com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.java
        getProperty method lack of support of this property.

        P.S. Actually there is a big problem to deal with found error. During validation
        we have little information for good error handling. F.g. during in-memory DOM
        validation we can get only hardcoded "strange" error message from the
        SAXParseException).

        I think the best way will be to change the ErrorHandler to the specialized
        validation error handler like below:

        public interface ValidationErrorHandler {

           public boolean handleError(ErrorInformation ei);
        }
         
        where handleError will return whether validator can continue validation and
        ErrorInformation has error node, error message text.
        It will be great to have access to the schema part(grammar part) responsible for
        this error (f.g. using Schema Object Model).

              joehw Joe Wang
              joehw Joe Wang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: