Skip to main content

Software  > Globalization > 

Globalize your On Demand Business

Prototype of G11N Policy Extensions

Different Web Services may support various locale-related information. In this section some extensions will be discussed about the <wsp:Policy> element for G11N properties of Web Services, so that the service requester can read the policy and recognize the provider’s G11N capability. Below, the currency and linear assertions as an extension example and other G11N extensions can be defined in the same way.

2.3.1 Currency Assertion
The schema outline for <wsgp:Currency> is as follows:

<Currency wsp:Usage=”…”? wsp:Preference=”…”? Currency=”…” >

</Currency>

The following describes the attributes and tags listed in the schema outlined above:

/Currency-This indicated supported currency unit.
/Currency/@wsp:Usage-This mandatory attribute indicates the usage of this assertion (e.g., required, optional, etc.).
/Currency/@wsp:Preference-This optional attribute specifies the preference of this particular alternative. The preference is expressed as an xsd:int per "XML Schema Part 2: Datatypes". The higher the value of the preference is, the greater the weighting of the expressed preference is. If no preference is specified, a value of zero is assumed.
/Currency/@Currency-The currency symbol is defined according to ISO 4217:Codes for the representation of currencies and funds. It is extensible, but the following types are predefined:

QName

Description

USD

United States of America, Dollars

EUR

Euro member countries, Euro

CNY

China, Yuan Renminbi

JPY

Japan, Yen

GBP

United Kingdom, Pounds

CAD

Canada, Dollars

AUD

Australia, Dollars

CHF

Switzerland, Francs

RUR

Russia, Rubles

ZAR

South Africa, Rand

MXN

Mexico, Pesos

/Currency/{any}-Additional child elements MAY be specified but MUST NOT contradict the semantics of the parent element; if an element is not recognized, it SHOULD be ignored.
/Currency/@{any}-Additional attributes MAY be specified but MUST NOT contradict the semantics of the owner element; if an attribute is not recognized, it SHOULD be ignored.
The following example illustrates the use of this declaration and indicates the Web services prefers CNY as the currency unit, but will also accept USD currency.

<wsp:ExactlyOne>

<wsgp:Currency wsp:Usage="wsp:Required" wsp:Preference="3" Currency="wsgp:CNY" />

<wsgp:Currency wsp:Usage="wsp:Required" wsp:Preference="1" Currency="wsgp:USD" />

</wsp:ExactlyOne>

2.3.2 Linear Assertion
The schema outline for <wsgp:Linear> is as follows:

<Linear wsp:Usage=”…” wsp:Preference=”…” Linear=”…” >

</Linear>

The following describes the attributes and tags listed in the schema outlined above:

/Linear-This indicated supported measurement of linear.
/Linear/@wsp:Usage-This mandatory attribute indicates the usage of this assertion (e.g., required, optional, etc.).
/Linear/@wsp:Preference-This optional attribute specifies the preference of this particular alternative. The preference is expressed as an xsd:int per "XML Schema Part 2: Datatypes". The higher the value of the preference is, the greater the weighting of the expressed preference is. If no preference is specified, a value of zero is assumed.
/Linear/@Linear-This is the symbol of linear measurement such as Mile, Kilometers and Nautical Mile. It is extensible, but the following types are predefined:

QName

Description

MILE

A unit of length equal to 5,280 feet or 1,760 yards (1,609 meters), used in the United States and other English-speaking countries.

KM

Kilometer, a metric unit of length equal to 1,000 meters (0.62 mile)

/Linear/{any}-Additional child elements MAY be specified but MUST NOT contradict the semantics of the parent element; if an element is not recognized, it SHOULD be ignored.
/Linear/@{any}-Additional attributes MAY be specified but MUST NOT contradict the semantics of the owner element; if an attribute is not recognized, it SHOULD be ignored.
The following example illustrates the use of this declaration. This example indicates the Web services prefers mile as the linear measurement unit, but will accept kilometer also.

<wsp:ExactlyOne>

<wsgp:Linear wsp:Usage="wsp:Required" wsp:Preference="3" Linear="wsgp:MILE" />

<wsgp:Linear wsp:Usage="wsp:Required" wsp:Preference="1" Linear="wsgp:KM" />

</wsp:ExactlyOne>


gray line

Continue to Usage of G11N Policy


E-mail us
Easy ways to get the answers you need.
E-mail us