1
通常我們用這種方式定義枚舉:XSD:枚舉可以包含多個屬性?
<xsd:enumeration value="World"/>
可以在其他屬性除了「值」被添加?例如:
<xsd:enumeration value="World" another="something" />
通常我們用這種方式定義枚舉:XSD:枚舉可以包含多個屬性?
<xsd:enumeration value="World"/>
可以在其他屬性除了「值」被添加?例如:
<xsd:enumeration value="World" another="something" />
的xsd:enumeration
元件doesn’t allow any attributes other than value
and id
。
從問題中不清楚你想要做什麼,但你知道你可以指定多個xsd:enumeration
元素,對嗎?這不完全是什麼元素?所以你可以這樣做:
<xsd:restriction base="xsd:string">
<xsd:enumeration value="World"/>
<xsd:enumeration value="something"/>
</xsd:restriction>