I'm using castor with a schema which contains elements for which the content
- is a string
- contains several (contiguous) blanks
- is very long
Because the XML files need to be human readable I switched
org.exolab.castor.indent=true in castor.properties.
Now because of the implementation of org.apache.xml.serialize.OutputFormat the
line length is automatically set to its default of 72 when indentation is
switched on.
This makes my strings being split into several lines AND blanks added in
between (at line beginnings) for the indentation.
When they get unmarshalled back, the string content is invalid (not the same
as before) which makes it unusable.
On one hand this is a limitation in Castor's Marshaller which doesn't allow to
change settings for line wrapping.
On the other hand this seems to be a erroneous behaviour of
OutputFormat/XMLSerializer: indentation should be performed for elements but
not in the middle of the element content, at least not as a default.
Question: should I file this as a bug/enhancement for Castor and/or for the
XMLSerializer/Xerces?
Opinions?
Cheers, Lars.
