【问题标题】:RelaxNG - *any* attribute?RelaxNG - *任何*属性?
【发布时间】:2011-07-20 23:23:13
【问题描述】:

有没有办法定义一个 any 名称属性?我正在验证用户可以并且确实将自己的属性应用于标签等的代码,这不会影响我的项目。

<define name="div">
  <zeroOrMore>
    <attribute name="*">
      <text />
    </attribute>
  </zeroOrMore>
  <text />
</define>

【问题讨论】:

    标签: validation relaxng


    【解决方案1】:

    &lt;anyName/&gt; 似乎就是您要找的东西:

    <define name="div">
      <zeroOrMore>
        <attribute>
         <anyName/>
        </attribute>
      </zeroOrMore>
      <text/>
    </define>
    

    【讨论】:

      猜你喜欢
      • 2017-10-16
      • 2013-09-07
      • 1970-01-01
      • 2015-09-02
      • 2016-12-18
      • 2012-05-30
      • 2011-12-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多