Difference of mixed=“true” and xs:extension in XML Schema

后端 未结 1 1724
一整个雨季
一整个雨季 2021-01-02 19:39

What is the practical diference between these two:


 
  

        
相关标签:
1条回答
  • 2021-01-02 19:55

    The two are different. Your first example uses mixed="true" which denotes mixed content, i.e. character data mixed in with child elements. Whereas your second example restricts the element content to the xs:string type. Both indicate the presence of an attribute.

    With your example, both are practically the same. However, if you do not plan on having mixed content, i.e. you do not plan to add child elements, the second version is much clearer.

    0 讨论(0)
提交回复
热议问题