This section discusses how HydraExpress and its data parser deal with non-UTF-8 character encodings.
For XML Schemas and WSDLs with a character encoding other than UTF-8, the Xerces-J parser used internally by HydraExpress automatically converts the string data to UTF-8 from the encoding specified in the document's prolog (See Section 19.5.3).
When providing non-UTF-8 schemas and WSDLs to HydraExpress, ensure that all characters in the document match the encoding stated in the document's prolog.
When providing non-UTF-8 schemas and WSDLs to HydraExpress, ensure that all characters in the document match the encoding stated in the document's prolog.
HydraExpress also supports non-ASCII XML element and attribute names. These names are handled in one of two ways:
If a customized mapping is defined to map the non-ASCII names to ASCII values, and this mapping is provided in a HydraExpress project file to the code generator, the binding uses the mapped element and attribute names. Here is an example mapping:
<rwsf-codegen-project> <options> <option name='project-name' value='MyMapping'/> ... </options> <mappings> <name xsdtype="element" xsdname="ãf³" name="i18nElement"/> <name xsdtype="attribute" xsdname="èç3" name="i18nAttribute"/> </mappings> </rwsf-codegen-project>
If no specialized mapping is supplied, the binding assigns element and attribute names based on the pattern Member<number>. The number assigned to any given element or attribute seems arbitrary, a result of the limitations of XSLT, which is used to generate the code. However, these names are just placeholders within the binding, so this issue does not affect the quality of the processed XML document.
Non-ASCII element and attribute names are preserved when an XML instance document is unmarshaled and later marshaled back into an XML document.
Classes created by HydraExpress parse XML using class rwsf::XmlReader. An instance of rwsf::XmlReader converts XML source to UTF-8, regardless of the original encoding. For details on the encodings that the reader supports, see the entry for rwsf::XmlReader in the HydraExpress C++ API Reference Guide.
HydraExpress produces XML documents in UTF-8.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.