2014-02-07 25 views
1

我需要知道什麼時候XML Schema枚舉非常重要。我知道驗證它是沒有意義的,如果我們改變枚舉值的順序。例如下面的代碼:枚舉順序在XML Schema中很重要

<simpleType name="sizeType"> 
    <restriction base="string"> 
     <enumeration value="small"/> 
     <enumeration value="medium"/> 
     <enumeration value="large"/> 
    </restriction> 
</simpleType> 

與此類似代碼:

<simpleType name="sizeType"> 
    <restriction base="string"> 
     <enumeration value="small"/> 
     <enumeration value="large"/> 
     <enumeration value="medium"/> 
    </restriction> 
</simpleType> 

在相關XML文檔的有效性方面。

我的問題是:是什麼,因爲我設計的XML變化檢測方法和不知道如果我需要枚舉值的順序在我的帳戶,使秩序重要的可能應用。

感謝您的幫助:)

回答

1

我猜有可能是數據綁定轉換XSD枚舉到在目標語言枚舉類型的工具,在這種情況下,爲了可能是顯著,但據XSD驗證關心的是,命令沒有任何區別。