Can I create an XSD schema that places an attribute on all complex types?

前端 未结 4 916
日久生厌
日久生厌 2021-01-06 14:02

I would like to create an XSD that defines an attribute which can be placed on elements from other schemas, or elements that are not in any schema. For example, the schema

4条回答
  •  有刺的猬
    2021-01-06 14:30

    Consider xsi:nil, xsi:schemaLocation and xsi:noNamespaceSchemaLocation. The answer is yes.

    It also wouldn't have taken long to try it out and see.


    You were missing a targetNamespace in the schema. Try this:

    
      
    
    

提交回复
热议问题