Hitachi

uCosminexus Application Server XML Processor User Guide


4.5 How to use the properties of the Shift_JIS switch function

To use the Shift_JIS switch function, you need to set the following property defined independently by Cosminexus XML Processor.

[Figure]

Set a character encoding as the property value. The following table lists the property values to set and their meanings.

Table 4‒5: Property values to set and their meanings

Value set in the property#1

Meaning

SJIS

Applies the SJIS encoding.

MS932

Applies the MS932 encoding.

Any other character string

Ignores the specification.#2

#1

The specified character string is not case-sensitive.

#2

If the specification is ignored, the last specified encoding is valid.

Important note

If the Shift_JIS switch function is not specified, the default encoding is SJIS.

The Shift_JIS switch function property needs to be set for each instance of the classes and interfaces shown below. The following table lists the methods for setting the Shift_JIS switch function. This table lists the methods to use for setting the properties for each class and interface.

Table 4‒6: Methods for setting the Shift_JIS switch function

Class and interface

Method

javax.xml.parsers.DocumentBuilderFactory

setAttribute

javax.xml.parsers.SAXParser

setProperty

org.xml.sax.XMLReader

setProperty

javax.xml.parsers.TransformerFactory

setAttribute

The following subsections describe the cases in which to use the Shift_JIS switch function for the DOM parser, SAX parser, and XSLT transformer.

Organization of this section