【发布时间】:2018-11-03 18:01:17
【问题描述】:
我有这个 XML 示例。
<root>
<Ilhas_da_Madeira_e_Porto_Santo update-date="2016-04-01" update-time="14:14:46">
<Santana update-author="sourceData" update-date="2016-04-01" update-time="14:14:48">
<year1995 ncrimes="33"/>
<year1994 ncrimes="58"/>
<year1993 ncrimes="33"/>
</Santana>
</Ilhas_da_Madeira_e_Porto_Santo>
<NE update-date="2016-04-01" update-time="14:14:48">
<NE update-author="sourceData" update-date="2016-04-01" update-time="14:14:48">
<year1995 ncrimes="163"/>
<year1994 ncrimes="125"/>
<year1993 ncrimes="126"/>
</NE>
</NE>
</root>
(XML 架构 - xsd)
我已经用xs:group 和xs:attributeGroup 对元素和属性进行分组。
问题:
是否可以这样做:elements with name_pattern="year(\d){4}" have attribute=ncrimes?
【问题讨论】:
标签: xml xsd xsd-validation