Changeset 6907 for metadata/trunk/toolkit/src/main/resources/toolkit/downgrade/cmd-component-1_2-to-1_1.xsl
- Timestamp:
- 01/14/16 12:05:44 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/src/main/resources/toolkit/downgrade/cmd-component-1_2-to-1_1.xsl
r6904 r6907 8 8 9 9 <xsl:param name="cmd-component-xsd" select="'http://infra.clarin.eu/cmd/general-component-schema.xsd'"/> 10 11 <xsl:param name="escape" select="'ccmmddii_'"/> 10 12 11 13 <!-- identity copy --> … … 80 82 <!-- turn Attribute child elements into attributes --> 81 83 <xsl:template match="Attribute" priority="1"> 82 <xsl:choose> 83 <xsl:when test="exists(parent::AttributeList/parent::Component) and Name=('ref','ComponentId')"> 84 <xsl:message>WRN: user-defined ref and ComponentId attributes for a Component are not supported by CMDI 1.1!</xsl:message> 85 </xsl:when> 86 <xsl:otherwise> 87 <Attribute> 88 <Name> 89 <xsl:value-of select="@name"/> 90 </Name> 91 <xsl:if test="normalize-space(@ConceptLink)!=''"> 92 <ConceptLink> 93 <xsl:value-of select="@ConceptLink"/> 94 </ConceptLink> 95 </xsl:if> 96 <xsl:if test="normalize-space(@ValueScheme)!=''"> 97 <Type> 98 <xsl:value-of select="@ValueScheme"/> 99 </Type> 100 </xsl:if> 101 <!-- @Required is skipped --> 102 <xsl:apply-templates select="node()"/> 103 </Attribute> 104 </xsl:otherwise> 105 </xsl:choose> 84 <xsl:variable name="name"> 85 <xsl:choose> 86 <xsl:when test="exists(parent::AttributeList/parent::Component) and Name=('ref','ComponentId')"> 87 <xsl:message>WRN: user-defined ref and ComponentId attributes for a Component are not supported by CMDI 1.1! Adding the <xsl:value-of select="$escape"/> prefix</xsl:message> 88 <xsl:value-of select="concat($escape,@name)"/> 89 </xsl:when> 90 <xsl:otherwise> 91 <xsl:value-of select="@name"/> 92 </xsl:otherwise> 93 </xsl:choose> 94 </xsl:variable> 95 <Attribute> 96 <Name> 97 <xsl:value-of select="$name"/> 98 </Name> 99 <xsl:if test="normalize-space(@ConceptLink)!=''"> 100 <ConceptLink> 101 <xsl:value-of select="@ConceptLink"/> 102 </ConceptLink> 103 </xsl:if> 104 <xsl:if test="normalize-space(@ValueScheme)!=''"> 105 <Type> 106 <xsl:value-of select="@ValueScheme"/> 107 </Type> 108 </xsl:if> 109 <!-- @Required is skipped --> 110 <xsl:apply-templates select="node()"/> 111 </Attribute> 106 112 </xsl:template> 107 113
Note: See TracChangeset
for help on using the changeset viewer.