Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-989

Better control over validation

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4
    • None
    • DTM
    • None
    • Operating System: All
      Platform: All
    • 8711

    Description

      Currently, Xalan doesn't give us much control over when input documents are
      validated; to take control, one has to instantiate a parser and pass in a
      SAXSource rather than letting Xalan create the parser instance itself.

      And the current state of the world is a bit confused; I think incremental vs.
      non-incremental, and Xerces versus other parsers, may affect whether validation
      occurs or not.

      We should provide a better set of controls for whether DTD and/or schema
      validation is performed. We did, long ago – see the commented-out -VALIDATION
      switch in Process.java – but that was dropped, probably because the XSLT data
      model requres some info which may only be available after DTD validation. There
      might still be an argument for allowing DTD validation to be turned off in
      special cases.

      (Note: For performance reasons, I do not currently recommend we default
      to schema validation being turned on. As Xerces improves the speed of their
      schema validator, we can reconsider that default.)

      (Also note: Turning off DTD validation may NOT prevent an external subset from
      being fetched. Setting the standalone flag in the document, ditto. The standard
      workaround if someone Really Doesn't Want that retrieval to occur is to plug in
      an EntityResolver that recognizes this request and returns an empty entity.
      There are quibbles about how that recognition is performed, but it might be nice
      if we included such a resolver as a canned tool, so Process to be told to use
      it. On the other hand, it's unclear that this one is a Xalan issue rather than a
      Xerces issue.)

      Attachments

        Activity

          People

            Unassigned Unassigned
            keshlam@us.ibm.com Joe Kesselman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: