[ http://issues.apache.org/jira/browse/XALANJ-203?page=all ]

Brian Minchau updated XALANJ-203:
---------------------------------

    Version: Latest Development Code
                 (was: 2.0.1)

> Xalan forces validation when entities are declared
> --------------------------------------------------
>
>          Key: XALANJ-203
>          URL: http://issues.apache.org/jira/browse/XALANJ-203
>      Project: XalanJ2
>         Type: Bug
>   Components: transformation, Xalan-interpretive
>     Versions: Latest Development Code
>  Environment: Operating System: Linux
> Platform: PC
>     Reporter: Chris McCabe
>     Assignee: Xalan Developers Mailing List

>
> When an internal DTD subset is declared in an XML file, Xalan forces 
> validation
> of the XML file, even if the internal DTD is used only for declaring 
> entities. 
> In fact the DTD need not declare anything at all.  The following simple XML 
> will
> result in a parse exception being passed to the ErrorHandler that states
> 'Element "foo" must be declared', even when validation is explicitly disabled
> before the transformation:
> <!DOCTYPE foo []>
> <foo/>
> This is only apparent when an ErrorHandler is set on the XMLReader.  Without 
> the
> ErrorHandler, you will never see the exception and the transformation will
> succeed.  A more realistic example:
> <!DOCTYPE foo [
>    <!ENTITY more SYSTEM "test2.xml">
> ]>
> <foo>
> &more;
> </foo>
> The DTD is necessary for declaring the external entities, but you should still
> be able to turn off validation.
> The reason the validation is turned on after disabling it is because Xalan 
> sets
> the dynamic validation feature of Xerces, which turns on validation when it 
> sees
> the DTD.  Disabling dynamic validation does not seem to have any negative 
> impact
> on the Xalan transformation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to