ここでは、XML文書の属性について説明します。
XML Schemaの属性(データ型)
XML文書(Schema)には、以下のビルトインデータ型を指定することができます。
ビルトインデータ型 | 内容 | 例 |
---|---|---|
string | 文字列 | ABC |
boolean | ブール値 | TRUE |
decimal | 10進数 | -1.23 |
float | 単精度32ビット浮動小数 | 1267.43233 |
double | 倍精度64ビット浮動小数 | 1267.43233 |
duration | 期間 | P1347Y |
dateTime | 日時 | 1999-05-31T13:20:00.00-05:00 |
time | 時刻 | 13:20:00.00-05:00 |
date | 日付 | 1999-05-31 |
gYearMonth | 年と月 | 1999-05 |
gYear | 年 | 1999 |
gMonthDay | 年の中の月日 | --05-31 |
gDay | 月の中の日 | ---31 |
gMonth | 月 | --05-- |
hexBinary | 16進表記のバイナリデータ | 0FB7 |
base64Binary | Base64表記のバイナリデータ | 5a+M5aOr6YCa |
anyURI | URI参照値 | http://www.example.com/ |
QName | 名前空間で修飾されたXMLの名前 | po:USAddress |
NOTATION | XML 1.0のNOTATION属性 |
|
normalizedString | 正規化された文字列 | ABC |
token | トークン化された文字列 | ABC |
language | XML 1.0の言語識別子 | en |
NMTOKEN | XML 1.0のNMTOKEN属性 |
|
NMTOKENS | XML 1.0のNMTOKENS属性 |
|
Name | XML 1.0の名前 | shipTo |
NCName | XML 1.0の名前からコロンを除いた名前 | USAddress |
ID | XML 1.0のID属性 |
|
IDREF | XML 1.0のIDREF属性 |
|
IDREFS | XML 1.0のIDREFS属性 |
|
ENTITY | XML 1.0のENTITY属性 |
|
ENTITIES | XML 1.0のENTITIES属性 |
|
integer | 整数 | -1 |
nonPositiveInteger | 非正の整数 | -1 |
negativeInteger | 負の整数 | -1 |
long | 8バイト整数 | -1 |
int | 4バイト整数 | -1 |
short | 2バイト整数 | -1 |
byte | 1バイト整数 | -1 |
nonNegativeInteger | 非負の整数 | 1 |
unsignedLong | 非負の8バイト整数 | 0 |
unsignedInt | 非負の4バイト整数 | 0 |
unsignedShort | 非負の2バイト整数 | 0 |
unsignedByte | 非負の1バイト整数 | 0 |
positiveInteger | 正の整数 | 1 |
XML文書(Schema)とのフォーマット変換では、以下の制約ファセットをサポートしています。記述のない制約ファセットはサポートしていません。
ビルトインデータ型 | サポートする制約ファセット | 「制約内容」フィールド指定時の例 |
---|---|---|
string | length(注) | length=5 |
boolean | なし |
|
decimal | totalDigits | totalDigits=5,fractionDigits=1 |
float | totalDigits | totalDigits=5,fractionDigits=1 |
double | totalDigits | totalDigits=5,fractionDigits=1 |
duration | なし |
|
dateTime | なし |
|
time | なし |
|
date | なし |
|
gYearMonth | なし |
|
gYear | なし |
|
gMonthDay | なし |
|
gDay | なし |
|
gMonth | なし |
|
hexBinary | なし |
|
base64Binary | なし |
|
anyURI | なし |
|
QName | なし |
|
NOTATION | なし |
|
normalizedString | length(注) | length=5 |
token | length(注) | length=5 |
language | なし |
|
NMTOKEN | なし |
|
NMTOKENS | なし |
|
Name | なし |
|
NCName | なし |
|
ID | なし |
|
IDREF | なし |
|
IDREFS | なし |
|
ENTITY | なし |
|
ENTITIES | なし |
|
integer | totalDigits | totalDigits=5 |
nonPositiveInteger | totalDigits | totalDigits=5 |
negativeInteger | totalDigits | totalDigits=5 |
long | totalDigits | totalDigits=5 |
int | totalDigits | totalDigits=5 |
short | totalDigits | totalDigits=5 |
byte | totalDigits | totalDigits=5 |
nonNegativeInteger | totalDigits | totalDigits=5 |
unsignedLong | totalDigits | totalDigits=5 |
unsignedInt | totalDigits | totalDigits=5 |
unsignedShort | totalDigits | totalDigits=5 |
unsignedByte | totalDigits | totalDigits=5 |
positiveInteger | totalDigits | totalDigits=5 |
(注)ユーザ固有フォーマットの入力がX属性、K属性の場合だけです。