XSL to remove prefixes.
authorMathieu Baudier <mbaudier@argeo.org>
Sat, 31 Oct 2020 11:22:32 +0000 (12:22 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Sat, 31 Oct 2020 11:22:32 +0000 (12:22 +0100)
org.argeo.jcr/src/org/argeo/jcr/xml/removePrefixes.xsl [new file with mode: 0644]

diff --git a/org.argeo.jcr/src/org/argeo/jcr/xml/removePrefixes.xsl b/org.argeo.jcr/src/org/argeo/jcr/xml/removePrefixes.xsl
new file mode 100644 (file)
index 0000000..813d065
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:output method="xml" indent="yes"/>
+  <xsl:template match="/|comment()|processing-instruction()">
+    <xsl:copy>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="*">
+    <xsl:element name="{local-name()}">
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:element>
+  </xsl:template>
+  <xsl:template match="@*">
+    <xsl:attribute name="{local-name()}">
+      <xsl:value-of select="."/>
+    </xsl:attribute>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file