I believe (although am not 100% sure because I haven't tried it myself) that
xmlValidation="true" means that TC's XML parser should check all XML against
the DTD defined in each XML source.  With xmlValidation="false", it will
check that the xml is "well-formed" but not that it is "valid".

See these refs:
http://www.w3.org/TR/REC-xml/#dt-valid
http://www.w3.org/TR/REC-xml/#dt-wellformed

So I think (?) that if you set xmlValidation="true", you must include a DTD
link in each XML source.  If you do not have one, this might be why you are
getting a stacktrace.  The reason for the long stacktrace is that the
parsing is done by a generic parser bundled into TC, so the TC authors
cannot control the call stack, or when exceptions are thrown or the
exception messages - they simply wrap them with a higher level exception as
appropriate.  If it helps, I have reported a similar issue where I thought
that TC's wrapping exception message could be made clearer to users.

Not sure about Xerces 2.2 but ISTR that there is some issue with a change to
the XML parser that ships with TC, this issue is mentioned in 5.5.x release
notes so that might be worth a look up
http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt  . See also "XML
Parsers and J2SE 1.4" at bottom of
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html - this might
be relevant?

> -----Original Message-----
> From: Bob Bronson [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday 26 October 2005 04:24
> To: tomcat-user@jakarta.apache.org
> Subject: ? xmlValidation Attribute -- What's it Mean ?
> 
> 
> Hi all,
> 
> I'm using TC 5.5.12.
> 
> Please look at this snippet from the server.xml that is distributed 
> with TC:
> 
>   <!-- Define the default virtual host
>         Note: XML Schema validation will not work with Xerces 2.2.
>     -->
>    <Host name="localhost" appBase="webapps"
>     unpackWARs="true" autoDeploy="true"
>     xmlValidation="false" xmlNamespaceAware="false">
> 
> 
> Can anyone tell me what the 'xmlValidation' attribute on 
> <Host> is for? 
> Obviously it has something to do with "XML validation" but 
> what XML? Is 
> it the corresponding web.xml? And how does the 'xmlNamespaceAware' 
> attribute fit in? Every web.xml I've ever seen uses the default 
> namespace?
> 
> And what's the comment about the Xerces 2.2 parser? I'm using 
> Sun's JDK 
> 1.5.0. Does that use Xerces internally?
> 
> When I set the 'xmlValidation' attribute to 'true' I get a big stack 
> trace. One would think it might be appropriate to offer a nice error 
> message describing the problem.
> 
> I've looked at the latest TC documentation for <Host> and it makes no 
> mention of the 'xmlValidation' attribute:
> http://tomcat.apache.org/tomcat-5.5-doc/config/host.html
> 
> Can someone please explain these two attributes? My web.xml 
> is getting 
> unwieldy and I'd like to start validating it.
> 
> Thanks very much.
> 
> --
> Bob Bronson 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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

Reply via email to