ぽざうねっと

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  396  : 記事  0  : コメント  1030  : トラックバック  66

ニュース

さて、今年の秋は何を漬けようか

書庫

日記カテゴリ

Accessory

Community

Private

制約ファセットで一つ忘れてました。
enumeration 制約ファセットなるものがあります。
これは、特定の値しか設定させないという制約ファセットです。
<xsd:attribute name="Enabled">
    <xsd:restriction type="xsd:string">
        <xsd:simpleType>
            <xsd:enumeration value="True"/>
            <xsd:enumeration value="False"/>
        </xsd:simpleType>
    </xsd:restriction>
</xsd:attribute>
このような、属性定義を行うと Enabled 属性には True か False しか設定できなくなります。
<xsd:attribute name="nowrap">
    <xsd:restriction type="xsd:string">
        <xsd:simpleType>
            <xsd:enumeration value="nowrap"/>
        </xsd:simpleType>
    </xsd:restriction>
</xsd:attribute>
とすれば一応下記と同値になるのかな?(やんないけどね)
<xsd:attribute name="nowrap" type="xsd:string" fixed="nowrap"/>
投稿日時 : 2007年7月7日 16:46

コメント

No comments posted yet.

Post Feedback

タイトル
名前
Url:
コメント: