【问题标题】:Allow variable element attributes in xml schema在 xml 模式中允许可变元素属性
【发布时间】:2013-02-14 18:41:42
【问题描述】:

如果我希望元素 complexType 具有变量属性名称、计数和值,它会是什么样子?

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

我试过了:

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

但它不这样做。

【问题讨论】:

    标签: xml xsd


    【解决方案1】:

    我终于成功了:

    <xsd:anyAttribute processContents="skip"/>
    

    【讨论】:

      【解决方案2】:

      尝试添加processContents=skip

      【讨论】:

      • 在哪里?对任何属性?它只接受 id、namespace 和 processContents 属性
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-23
      • 1970-01-01
      • 2016-08-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多