-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathobjectFormatListv2-to-v1.xsl
More file actions
28 lines (24 loc) · 1.01 KB
/
objectFormatListv2-to-v1.xsl
File metadata and controls
28 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:V2="http://ns.dataone.org/service/types/v2.0"
xmlns:V1="http://ns.dataone.org/service/types/v1" >
<xsl:output encoding="UTF-8" method="xml" indent="yes"/>
<xsl:strip-space elements="*" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@xsi:schemaLocation">
<xsl:attribute name="{name()}">
<xsl:text>http://ns.dataone.org/service/types/v1 dataoneTypes.xsd</xsl:text>
</xsl:attribute>
</xsl:template>
<xsl:template match="V2:*">
<xsl:element name="V1:{local-name()}" namespace="http://ns.dataone.org/service/types/v1">
<xsl:apply-templates select="@*|node() "/>
</xsl:element>
</xsl:template>
<xsl:template match="extension | mediaType" />
</xsl:stylesheet>