11c81fcd8e1d6f7759c6c852f111735cbd09fa9a
[utils] / crawler / kiss / src / main / resources / mainpage.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3     xmlns:xhtml="http://www.w3.org/1999/xhtml"
4     version="1.0">
5     
6     <xsl:output method="xml"/>
7     <xsl:strip-space elements="*"/>
8     
9     <!-- =====================================================
10         Copying template.
11         ===================================================== -->
12     <xsl:template match="@*|node()" mode="copy">
13         <xsl:copy>
14             <xsl:apply-templates select="@*|node()" mode="copy"/>
15         </xsl:copy>
16     </xsl:template>
17     
18     <xsl:template match="/">
19         <xsl:element name="loginform">
20             <xsl:apply-templates select="//xhtml:form"/>     
21         </xsl:element>
22     </xsl:template>
23     
24     <xsl:template match="//xhtml:form">
25         <xsl:element name="action">
26             <xsl:attribute name="name">login</xsl:attribute>
27             <xsl:attribute name="reference"><xsl:value-of select="@action"/></xsl:attribute>
28             <xsl:attribute name="type">login</xsl:attribute>
29             <xsl:apply-templates select="//xhtml:input[@type='hidden']"/>     
30         </xsl:element>
31        
32     </xsl:template>
33     
34     <xsl:template match="xhtml:input">
35         <xsl:element name="param">
36             <xsl:attribute name="name">
37                 <xsl:value-of select="@name"/>
38             </xsl:attribute>
39             <xsl:attribute name="value">
40                 <xsl:value-of select="@value"/>
41             </xsl:attribute>
42         </xsl:element>
43     </xsl:template>
44 </xsl:stylesheet>