Allow variable element attributes in xml schema

一世执手 提交于 2019-12-24 11:07:53

问题


How would the element complexType look like if I want it to have variable attribute names, count and values ?

<mtd:attributes icon="remove" security="D" variable1="F" variable2="D"/>

I tried :

        <xsd:element name="attributes">
            <xsd:complexType>
                <xsd:anyAttribute/>
            </xsd:complexType>
        </xsd:element>

but it doesn't do it.


回答1:


I finally made it with :

<xsd:anyAttribute processContents="skip"/>



回答2:


Try to add processContents=skip



来源:https://stackoverflow.com/questions/14872678/allow-variable-element-attributes-in-xml-schema

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!