Changeset 7018
- Timestamp:
- 06/10/16 10:33:33 (8 years ago)
- Location:
- CMDIValidator/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CMDIValidator/trunk/cmdi-validator-core/src/main/resources/default.sch
r5369 r7018 1 1 <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> 2 <ns uri="http://www.clarin.eu/cmd/" prefix="cmd"/> 2 <ns uri="http://www.clarin.eu/cmd/" prefix="cmd11"/> 3 <ns uri="http://www.clarin.eu/cmd/1" prefix="cmd12"/> 3 4 <ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/> 4 5 5 6 <pattern> 6 <rule role="warning" context="cmd :Header">7 <assert test="string-length(cmd :MdProfile/text()) > 0">7 <rule role="warning" context="cmd11:Header"> 8 <assert test="string-length(cmd11:MdProfile/text()) > 0"> 8 9 [CMDI Best Practices] A CMDI instance should contain a non-empty <cmd:MdProfile> element in <cmd:Header>. 9 10 </assert> 10 11 </rule> 11 12 </pattern> 12 13 13 <pattern> 14 <rule role="warning" context="cmd:Header"> 15 <assert test="string-length(cmd:MdSelfLink/text()) > 0"> 14 <rule role="warning" context="cmd12:Header"> 15 <assert test="string-length(cmd12:MdProfile/text()) > 0"> 16 [CMDI Best Practices] A CMDI instance should contain a non-empty <cmd:MdProfile> element in <cmd:Header>. 17 </assert> 18 </rule> 19 </pattern> 20 21 <pattern> 22 <rule role="warning" context="cmd11:Header"> 23 <assert test="string-length(cmd11:MdSelfLink/text()) > 0"> 16 24 [CMDI Best Practices] A CMDI instance should contain a non-empty <cmd:MdSelfLink> element in <cmd:Header>. 17 25 </assert> 18 26 </rule> 19 27 </pattern> 20 21 <!--22 28 <pattern> 23 <rule context="cmd:Header" role="information"> 24 <report test="cmd:MdSelfLink">MdSelfLink "<value-of select="cmd:MdSelfLink"/>".</report> 25 </rule> 29 <rule role="warning" context="cmd12:Header"> 30 <assert test="string-length(cmd12:MdSelfLink/text()) > 0"> 31 [CMDI Best Practices] A CMDI instance should contain a non-empty <cmd:MdSelfLink> element in <cmd:Header>. 32 </assert> 33 </rule> 26 34 </pattern> 27 -->28 35 29 36 <!-- … … 34 41 <pattern> 35 42 <title>Test xsi:schemaLocation</title> 36 <rule role="warning" context="/cmd :CMD">43 <rule role="warning" context="/cmd11:CMD"> 37 44 <assert test="contains(@xsi:schemaLocation,'http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/')"> 45 [CMDI Best Practice] /cmd:CMD/@xsi:schemaLocation doesn't refer to a schema from the Component Registry! [Actual value was [<value-of select="@xsi:schemaLocation"/>] 46 </assert> 47 </rule> 48 </pattern> 49 <pattern> 50 <title>Test xsi:schemaLocation</title> 51 <rule role="warning" context="/cmd12:CMD"> 52 <assert test="contains(@xsi:schemaLocation,'http://alpha-vlo.clarin.eu/component-registry-rest/rest/registry/1.x/profiles/')"> 38 53 [CMDI Best Practice] /cmd:CMD/@xsi:schemaLocation doesn't refer to a schema from the Component Registry! [Actual value was [<value-of select="@xsi:schemaLocation"/>] 39 54 </assert> … … 44 59 <pattern> 45 60 <title>Test for ResourceProxies</title> 46 <rule role="warning" context="/cmd:CMD/cmd:Resources/cmd:ResourceProxyList"> 47 <assert test="count(cmd:ResourceProxy) ge 1"> 61 <rule role="warning" context="/cmd11:CMD/cmd11:Resources/cmd11:ResourceProxyList"> 62 <assert test="count(cmd11:ResourceProxy) ge 1"> 63 [CMDI Best Practices] There should be at least one ResourceProxy! Otherwise this is the metadata of what? Itself? 64 </assert> 65 </rule> 66 </pattern> 67 <pattern> 68 <title>Test for ResourceProxies</title> 69 <rule role="warning" context="/cmd12:CMD/cmd12:Resources/cmd12:ResourceProxyList"> 70 <assert test="count(cmd12:ResourceProxy) ge 1"> 48 71 [CMDI Best Practices] There should be at least one ResourceProxy! Otherwise this is the metadata of what? Itself? 49 72 </assert> … … 54 77 <pattern> 55 78 <title>Test for known profile</title> 56 <rule role="warning" context="/cmd:CMD"> 57 <assert test="matches(@xsi:schemaLocation,'clarin.eu:cr[0-9]+:p_[0-9]+.+') or matches(cmd:Header/cmd:MdProfile,'clarin.eu:cr[0-9]+:p_[0-9]+.+')"> 79 <rule role="warning" context="/cmd11:CMD"> 80 <assert test="matches(@xsi:schemaLocation,'clarin.eu:cr[0-9]+:p_[0-9]+.+') or matches(cmd11:Header/cmd11:MdProfile,'clarin.eu:cr[0-9]+:p_[0-9]+.+')"> 81 [CMDI Best Practice] the CMD profile of this record can't be found in the /cmd:CMD/@xsi:schemaLocation or /cmd:CMD/cmd:Header/cmd:MdProfile. The profile should be known for the record to be processed properly in the CLARIN joint metadata domain! 82 </assert> 83 </rule> 84 </pattern> 85 <pattern> 86 <title>Test for known profile</title> 87 <rule role="warning" context="/cmd12:CMD"> 88 <assert test="matches(@xsi:schemaLocation,'clarin.eu:cr[0-9]+:p_[0-9]+.+') or matches(cmd12:Header/cmd12:MdProfile,'clarin.eu:cr[0-9]+:p_[0-9]+.+')"> 58 89 [CMDI Best Practice] the CMD profile of this record can't be found in the /cmd:CMD/@xsi:schemaLocation or /cmd:CMD/cmd:Header/cmd:MdProfile. The profile should be known for the record to be processed properly in the CLARIN joint metadata domain! 59 90 </assert> … … 64 95 <pattern> 65 96 <title>Test for CMD namespace schema binding</title> 66 <rule role="warning" context="/cmd :CMD">97 <rule role="warning" context="/cmd11:CMD"> 67 98 <assert test="matches(@xsi:schemaLocation,'http://www.clarin.eu/cmd/ ')"> 68 [possible CMDI Best Practice] is the CMD namespace properly bound to a profile schema? 99 [possible CMDI Best Practice] is the CMD 1.1 namespace properly bound to a profile schema? 100 </assert> 101 </rule> 102 </pattern> 103 <pattern> 104 <title>Test for CMD namespace schema binding</title> 105 <rule role="warning" context="/cmd12:CMD"> 106 <assert test="matches(@xsi:schemaLocation,'http://www.clarin.eu/cmd/1 ')"> 107 [possible CMDI Best Practice] is the CMD 1.2 namespace properly bound to a profile schema? 69 108 </assert> 70 109 </rule> … … 75 114 <title>Test for cmd:CMD root</title> 76 115 <rule role="warning" context="/"> 77 <assert test="exists(cmd :CMD)">116 <assert test="exists(cmd11:CMD) or exists(cmd12:CMD)"> 78 117 [CMDI violation] is this really a CMD record? Is the namespace properly declared, e.g., including ending slash? 79 118 </assert> -
CMDIValidator/trunk/cmdi-validator-core/src/main/resources/schematron/ExtractSchFromXSD-2.xsl
r5056 r7018 69 69 <xsl:copy-of select="$schemas//xs:appinfo/sch:phase"/> 70 70 <xsl:copy-of select="$schemas//xs:appinfo/sch:pattern"/> 71 <xsl:copy-of select="$schemas//xs:appinfo/xsl:*"/> 71 72 <sch:diagnostics> 72 73 <xsl:copy-of select="$schemas//xs:appinfo/sch:diagnostics/*"/> -
CMDIValidator/trunk/pom.xml
r5736 r7018 86 86 </pluginManagement> 87 87 </build> 88 89 <distributionManagement> 90 <snapshotRepository> 91 <id>CLARIN-Snapshot</id> 92 <url>https://nexus.clarin.eu/content/repositories/clarin-snapshot</url> 93 </snapshotRepository> 94 <repository> 95 <id>CLARIN</id> 96 <url>https://nexus.clarin.eu/content/repositories/Clarin</url> 97 </repository> 98 </distributionManagement> 88 99 </project>
Note: See TracChangeset
for help on using the changeset viewer.