 |
 |
 |
MSXML version 4, SAX parser using C++
The parser is removing line feeds from a text field that is being returned
to the content handler. The line feeds are necessary for other processing. I
have tried different variations of the preserve whitespace option in the xsd
validation file but it still removes them. Here is the relevant section of
the xsd:
<xs:simpleType name="commentType">
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="comment" type="commentType" />
<xs:element name="comment_list">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" ref="comment" />
</xs:sequence>
</xs:complexType>
</xs:element>
For example, the comment comes in the xml as:
<comment>[x]aaa
[y]bbb
[z]ccc<comment>
and the SAXContentHandlerImpl derived character function in the content
handler provides [x]aaa[y]bbb[z]ccc
It would be also be OK to preserve whitespace globally if there is a
property or feature that can be set within the SAXXMLReader40 or
XMLSchemaCache40 objects.
Any suggestions? We had assumed the Preserving Whitespace would have left
the linefeeds intact, but so far, no luck.
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |