Changes between Version 3 and Version 4 of CMDI 1.2/Attributes/Namespace


Ignore:
Timestamp:
02/04/14 14:25:11 (10 years ago)
Author:
mwindhouwer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CMDI 1.2/Attributes/Namespace

    v3 v4  
    2626  xmlns:cmd="http://www.clarin.eu/cmd/">
    2727...
    28   <MyElement myAttribute="value" cmd:ref="resourceProxy1" cmd:componentId="clarin.eu:cr1:c_1328259700912">...</MyElement>
     28  <MyComponent myAttribute="value" cmd:ref="resourceProxy1" cmd:componentId="clarin.eu:cr1:c_1328259700912">...</MyComponent>
    2929}}}
     30
     31To achieve this we have to make the following changes to the XSD generated by the CR:
     32
     33{{{#!xml
     34<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dcr="http://www.isocat.org/ns/dcr" xmlns:cmd="http://www.clarin.eu/cmd/" targetNamespace="http://www.clarin.eu/cmd/" elementFormDefault="qualified">         
     35    ...
     36    <!-- globally declare @ref and @ComponentId, so they have to be qualified -->
     37    <xs:attribute name="ref"/>
     38    <xs:attribute name="ComponentId" type="xs:anyURI"/>
     39    ...
     40    <xs:element name="myComponent" ... >
     41        <xs:complexType>
     42            <xs:sequence>
     43                ...
     44            </xs:sequence>
     45            <!-- refer to the globally declared attributes -->
     46            <xs:attribute ref="cmd:ref"/>
     47            <xs:attribute ref="cmd:ComponentId" fixed="clarin.eu:cr1:c_1328259700912"/>
     48        </xs:complexType>
     49    </xs:element>
     50    ...
     51</xs:schema>         
     52}}}
     53
     54Note: cleanup-xsd.xsl also needs to be adopted as it currently will prune away the new global <xs:attribute/> elements.
    3055
    3156== Tickets ==