Changeset 986
- Timestamp:
- 12/13/10 17:18:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/xslt/olac2cmdi.xsl
r984 r986 137 137 <contributor> 138 138 <xsl:if test="@xsi:type='olac:role'"> 139 <xsl:attribute name="olac-role"> 140 <!-- note: namespace wildcard necessary to match with both OLAC 1.0 and 1.1 --> 141 <xsl:value-of select="@*:code"/> 142 </xsl:attribute> 139 <xsl:if test="@*:code"> 140 <xsl:attribute name="olac-role"> 141 <!-- note: namespace wildcard necessary to match with both OLAC 1.0 and 1.1 --> 142 <xsl:value-of select="@*:code"/> 143 </xsl:attribute> 144 </xsl:if> 143 145 </xsl:if> 144 146 <xsl:value-of select="."/> … … 156 158 <xsl:template match="dc:language[@xsi:type='olac:language']" priority="3"> 157 159 <language> 158 <xsl:attribute name="olac-language"> 159 <!-- can be enabled when there is a 1-to-1 mapping in sil_to_iso6393.xml --> 160 <xsl:choose> 161 <xsl:when test="contains(@*:code, 'x-sil-')"> 162 <xsl:apply-templates select="$lang-top"> 163 <xsl:with-param name="curr-label" select="."/> 164 </xsl:apply-templates> 165 </xsl:when> 166 <xsl:otherwise> 167 <xsl:value-of select="@*:code"/> 168 </xsl:otherwise> 169 </xsl:choose> 170 </xsl:attribute> 160 <xsl:if test="@*:code"> 161 <xsl:attribute name="olac-language"> 162 <!-- can be enabled when there is a 1-to-1 mapping in sil_to_iso6393.xml --> 163 <xsl:choose> 164 <xsl:when test="contains(@*:code, 'x-sil-')"> 165 <xsl:apply-templates select="$lang-top"> 166 <xsl:with-param name="curr-label" select="."/> 167 </xsl:apply-templates> 168 </xsl:when> 169 <xsl:otherwise> 170 <xsl:value-of select="@*:code"/> 171 </xsl:otherwise> 172 </xsl:choose> 173 </xsl:attribute> 174 </xsl:if> 175 <xsl:value-of select="."/> 171 176 </language> 172 177 </xsl:template> … … 186 191 <subject> 187 192 <!-- can be enabled when there is a 1-to-1 mapping in sil_to_iso6393.xml --> 188 <xsl:attribute name="olac-language"> 189 <xsl:choose> 190 <xsl:when test="contains(@*:code, 'x-sil-')"> 191 <xsl:apply-templates select="$lang-top"> 192 <xsl:with-param name="curr-label" select="."/> 193 </xsl:apply-templates> 194 </xsl:when> 195 <xsl:otherwise> 196 <xsl:value-of select="@*:code"/> 197 </xsl:otherwise> 198 </xsl:choose> 199 </xsl:attribute> 193 <xsl:if test="@*:code"> 194 <xsl:attribute name="olac-language"> 195 <xsl:choose> 196 <xsl:when test="contains(@*:code, 'x-sil-')"> 197 <xsl:apply-templates select="$lang-top"> 198 <xsl:with-param name="curr-label" select="."/> 199 </xsl:apply-templates> 200 </xsl:when> 201 <xsl:otherwise> 202 <xsl:value-of select="@*:code"/> 203 </xsl:otherwise> 204 </xsl:choose> 205 </xsl:attribute> 206 </xsl:if> 207 <xsl:value-of select="."/> 200 208 </subject> 201 209 </xsl:template> … … 203 211 <xsl:template match="//dc:subject[@xsi:type='olac:linguistic-field']" priority="3"> 204 212 <subject> 205 <xsl:attribute name="olac-linguistic-field"> 206 <xsl:value-of select="@*:code"/> 207 </xsl:attribute> 213 <xsl:if test="@*:code"> 214 <xsl:attribute name="olac-linguistic-field"> 215 <xsl:value-of select="@*:code"/> 216 </xsl:attribute> 217 </xsl:if> 218 <xsl:value-of select="."/> 208 219 </subject> 209 220 </xsl:template> … … 214 225 <xsl:value-of select="@*:code"/> 215 226 </xsl:attribute> 227 <xsl:value-of select="."/> 216 228 </subject> 217 229 </xsl:template> … … 238 250 <xsl:template match="//dc:type[@xsi:type='olac:discourse-type']" priority="2"> 239 251 <type> 240 <xsl:attribute name="olac-discourse-type"> 241 <xsl:value-of select="@*:code"/> 242 </xsl:attribute> 252 <xsl:if test="@*:code"> 253 <xsl:attribute name="olac-discourse-type"> 254 <xsl:value-of select="@*:code"/> 255 </xsl:attribute> 256 </xsl:if> 257 <xsl:value-of select="."/> 243 258 </type> 244 259 </xsl:template> … … 247 262 <xsl:template match="//dc:type[@xsi:type='olac:linguistic-type']" priority="2"> 248 263 <type> 249 <xsl:attribute name="olac-linguistic-type"> 250 <xsl:value-of select="@*:code"/> 251 </xsl:attribute> 264 <xsl:if test="@*:code"> 265 <xsl:attribute name="olac-linguistic-type"> 266 <xsl:value-of select="@*:code"/> 267 </xsl:attribute> 268 </xsl:if> 269 <xsl:value-of select="."/> 252 270 </type> 253 271 </xsl:template>
Note: See TracChangeset
for help on using the changeset viewer.