Hi,

I had the problem, that the parser (Xerces, newest release) I use has a
feature activated, that normalizes
values for attributes and elements. (see
http://xml.apache.org/xerces2-j/features.html )

This feature is nice, but it seems that it also tries to normalize a CDATA
section when XSD-validation is turned on. So whenever there is an element
like
<musicgenre><![CDATA[R&B]]></musicgenre>
in an XML-file, the CDATA section causes an exception, because the
normalization of "R&B" does not work. Note that normalization of "R & B"
would work, but assume that I can't change the given xml.

So, is this a bug or just a special feature of Xerces?

Now I can turn off this feature by setting it via the
setFeature(String,Boolean)-method to false,
but ain't there a way to configure such (default-set-to-true-) features by a
properties file?

I know I can define the parser to use (JAXP properties etc.), but I can't
define features that way?

Imaging you have some unmarshalling classes generated automatically by JAXB
and you are not able to set this feature there, so there ain't a chance to
do this?
Hard to imageing...

Any comments welcome

regards
Chris




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

Reply via email to