clarin-eric / cmdi-toolkit

GNU General Public License v3.0
7 stars 2 forks source link

Add instance schematron rule: Use common namespace prefixes (BP X2) #9

Closed twagoo closed 5 years ago

twagoo commented 5 years ago

Best practice X2: Use common namespace prefixes

Namespace prefixes are officially just syntactic sugar in XML, i.e., provide a convenient shortcut. However, using common prefixes enable users to quickly assess the scope of an element. The CMDI 1.2 specification recommends the following prefixes for the namespaces URIs in CMDI as described in Table 1.1 on the following page.

menzowindhouwer commented 5 years ago

Turns out this is already implemented: https://github.com/clarin-eric/cmdi-toolkit/blob/0656fcfb3af442eb3abe6ee100a3eae1a7b93d81/src/main/resources/toolkit/sch/cmd-record-best-practices.sch#L109-L118 (The cue and xs prefixes are not used in records.)