source: metadata/trunk/toolkit/src/main/resources/toolkit/sch/cmd-component-best-practices.sch @ 6908

Last change on this file since 6908 was 6908, checked in by Menzo Windhouwer, 9 years ago

M toolkit/src/main/resources/toolkit/xsd/cmd-component.xsd
M toolkit/src/main/resources/toolkit/sch/cmd-component-best-practices.sch

  • moved a_nest Schematron rule to best practices

M toolkit/src/main/resources/toolkit/upgrade/cmd-record-1_1-to-1_2.xsl

  • added TODO
File size: 1.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
3    <sch:ns uri="http://www.clarin.eu/cmd/" prefix="cmd"/>
4    <sch:ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/>
5 
6    <sch:pattern id="c_nest">
7        <sch:title>Check nesting</sch:title>
8        <sch:rule context="Component[exists(Component|Element)]" role="warning">
9            <sch:assert test="empty((Component|Element)[@name=current()/@name])">A nested component or element has the same name ('<sch:value-of select="@name"/>') as this component! Please, consider to rename one of them.</sch:assert>
10        </sch:rule>
11    </sch:pattern>
12   
13    <sch:pattern id="a_nest">
14        <sch:title>Check attribute nesting</sch:title>
15        <sch:rule context="Attribute" role="warning">
16            <sch:assert test="empty((ancestor::Component|ancestor::Element)[1][@name=current()/@ame])">An attribute has the same name ('<sch:value-of select="@name"/>') as its element or component! Please, consider to rename one of them.</sch:assert>
17        </sch:rule>
18    </sch:pattern>
19   
20</sch:schema>
Note: See TracBrowser for help on using the repository browser.