[ http://nagoya.apache.org/jira/browse/XALANJ-989?page=history ]

Henry Zongaro updated XALANJ-989:
---------------------------------

      Assign To:     (was: Xalan Developers Mailing List)
           type: New Feature  (was: Bug)
    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.)

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

    Environment: 
Operating System: All
Platform: All

  was:
Operating System: All
Platform: All

       Priority: Major
    Bugzilla Id:   (was: 8711)

> Better control over validation
> ------------------------------
>
>          Key: XALANJ-989
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-989
>      Project: XalanJ2
>         Type: New Feature
>   Components: DTM
>     Versions: CurrentCVS
>  Environment: Operating System: All
> Platform: All
>     Reporter: Joe Kesselman

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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to