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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 1.4.0
    • Component/s: xml
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.4
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        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).

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: