Migration to maven almost complete. At least everything builds and works
[utils] / crawler / kiss / src / main / resources / mainpage.xsl
diff --git a/crawler/kiss/src/main/resources/mainpage.xsl b/crawler/kiss/src/main/resources/mainpage.xsl
new file mode 100644 (file)
index 0000000..11c81fc
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xhtml="http://www.w3.org/1999/xhtml"
+    version="1.0">
+    
+    <xsl:output method="xml"/>
+    <xsl:strip-space elements="*"/>
+    
+    <!-- =====================================================
+        Copying template.
+        ===================================================== -->
+    <xsl:template match="@*|node()" mode="copy">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()" mode="copy"/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template match="/">
+        <xsl:element name="loginform">
+            <xsl:apply-templates select="//xhtml:form"/>     
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="//xhtml:form">
+        <xsl:element name="action">
+            <xsl:attribute name="name">login</xsl:attribute>
+            <xsl:attribute name="reference"><xsl:value-of select="@action"/></xsl:attribute>
+            <xsl:attribute name="type">login</xsl:attribute>
+            <xsl:apply-templates select="//xhtml:input[@type='hidden']"/>     
+        </xsl:element>
+       
+    </xsl:template>
+    
+    <xsl:template match="xhtml:input">
+        <xsl:element name="param">
+            <xsl:attribute name="name">
+                <xsl:value-of select="@name"/>
+            </xsl:attribute>
+            <xsl:attribute name="value">
+                <xsl:value-of select="@value"/>
+            </xsl:attribute>
+        </xsl:element>
+    </xsl:template>
+</xsl:stylesheet>