Changeset 6751
- Timestamp:
- 11/06/15 09:49:45 (9 years ago)
- Location:
- metadata/trunk/toolkit/src/main/resources/toolkit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/src/main/resources/toolkit/upgrade/cmd-record-1_1-to-1_2.xsl
r6684 r6751 152 152 <xsl:when test="exists(parent::*/text()[normalize-space()!=''])"> 153 153 <!-- this is an element keep the @ref --> 154 <!--<xsl:message>INF: this is an element keep the ref</xsl:message>--> 154 155 <xsl:copy/> 155 156 </xsl:when> 156 157 <xsl:when test="exists(../node()) or exists(parent::*/@ComponentId)"> 157 158 <!-- the parent is a component add the namespace to @ref --> 159 <!--<xsl:message>INF: this is an component add the namespace to ref</xsl:message>--> 158 160 <xsl:attribute name="cmd:ref" select="."/> 159 161 </xsl:when> … … 165 167 <xsl:variable name="attr" select="$prof//Attribute[Name='ref'][string-join(ancestor::*[local-name()=('CMD_Component','CMD_Element')]/@name,'/')=string-join($path/local-name(),'/')]"/> 166 168 <xsl:choose> 167 <xsl:when test="exists($attr/parent::AttributeList/parent::CMD_Component)"> 168 <!-- the parent is a component add the namespace to @ref --> 169 <xsl:attribute name="cmd:ref" select="."/> 169 <xsl:when test="exists($attr)"> 170 <!-- in CMDI 1.1 @ref can only be an user declared attribute for an element --> 171 <!--<xsl:message>INF: according to the profile this @ref is an user declared attribute, so keep the ref</xsl:message>--> 172 <xsl:copy/> 170 173 </xsl:when> 171 174 <xsl:otherwise> 172 <!-- this is an element keep the @ref --> 173 <xsl:copy/> 175 <!-- this is an undeclared @ref, so add the namespace --> 176 <!--<xsl:message>INF: according to the profile this @ref is not user defined, so add the namespace</xsl:message>--> 177 <xsl:attribute name="cmd:ref" select="."/> 174 178 </xsl:otherwise> 175 179 </xsl:choose> -
metadata/trunk/toolkit/src/main/resources/toolkit/xslt/comp2schema.xsl
r6255 r6751 6 6 --> 7 7 8 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns: dcr="http://www.isocat.org/ns/dcr" xmlns:ann="http://www.clarin.eu" xmlns:cmd="http://www.clarin.eu/cmd/1" xmlns:cue="http://www.clarin.eu/cmdi/cues/display/1.0">8 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cmd="http://www.clarin.eu/cmd/1" xmlns:cue="http://www.clarin.eu/cmdi/cues/display/1.0"> 9 9 10 10 <xsl:param name="cmd-toolkit" select="'../../../../../main/resources/toolkit'"/> … … 81 81 82 82 <xsl:template match="*" mode="Header"> 83 <xsl:element name=" ann:{name()}" namespace="http://www.clarin.eu">83 <xsl:element name="cmd:{name()}"> 84 84 <xsl:value-of select="text()"/> 85 85 <xsl:apply-templates select="*" mode="Header"/> … … 301 301 <xs:attribute name="{@name}"> 302 302 303 <!-- Add a dcr:datcatif a ConceptLink element is found -->303 <!-- Add a cmd:ConceptLink if a ConceptLink element is found --> 304 304 <xsl:if test="normalize-space(@ConceptLink)!=''"> 305 <xsl:attribute name=" dcr:datcat">305 <xsl:attribute name="cmd:ConceptLink"> 306 306 <xsl:value-of select="@ConceptLink"/> 307 307 </xsl:attribute> … … 404 404 <!-- end multilinguality part --> 405 405 406 <!-- Add a @ dcr:datcatif a ConceptLink attribute is found -->406 <!-- Add a @cmd:ConceptLink if a ConceptLink attribute is found --> 407 407 <xsl:template match="@ConceptLink"> 408 <xsl:attribute name=" dcr:datcat">408 <xsl:attribute name="cmd:ConceptLink"> 409 409 <xsl:value-of select="."/> 410 410 </xsl:attribute> … … 412 412 413 413 <xsl:template match="@AppInfo"> 414 <xsl:attribute name=" ann:label">414 <xsl:attribute name="cmd:label"> 415 415 <xsl:value-of select="."/> 416 416 </xsl:attribute> … … 424 424 425 425 <xsl:template match="Vocabulary/@URI"> 426 <xsl:attribute name=" ann:Vocabulary">426 <xsl:attribute name="cmd:Vocabulary"> 427 427 <xsl:value-of select="."/> 428 428 </xsl:attribute> … … 430 430 431 431 <xsl:template match="@ValueProperty|@ValueLanguage"> 432 <xsl:attribute name=" ann:{local-name()}">432 <xsl:attribute name="cmd:{local-name()}"> 433 433 <xsl:value-of select="."/> 434 434 </xsl:attribute> … … 443 443 444 444 <xsl:template match="@AutoValue"> 445 <xsl:attribute name=" ann:AutoValue">445 <xsl:attribute name="cmd:AutoValue"> 446 446 <xsl:value-of select="."/> 447 447 </xsl:attribute> … … 449 449 450 450 <xsl:template match="@cue:DisplayPriority" priority="1"> 451 <xsl:attribute name=" ann:displaypriority">451 <xsl:attribute name="cue:displaypriority"> 452 452 <xsl:value-of select="."/> 453 453 </xsl:attribute> … … 455 455 456 456 <xsl:template match="@cue:*"> 457 <xsl:attribute name=" ann:{local-name()}">457 <xsl:attribute name="cue:{local-name()}"> 458 458 <xsl:value-of select="."/> 459 459 </xsl:attribute>
Note: See TracChangeset
for help on using the changeset viewer.