2017-03-06 12 views
1

通常我們用這種方式定義枚舉:XSD:枚舉可以包含多個屬性?

<xsd:enumeration value="World"/> 

可以在其他屬性除了「值」被添加?例如:

<xsd:enumeration value="World" another="something" /> 

回答

2

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>