3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:uwobo="http://helm.cs.unibo.it/uwobo"
6 xmlns:subst="http://www.cs.unibo.it/helm/subst"
12 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
13 media-type="text/html" />
19 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
20 doctype-system="DTD/xhtml1-transitional.dtd" />
23 <xsl:param name="processorURL" select="''"/>
24 <xsl:param name="profile" select="''"/>
26 <xsl:variable name="params" select="document(concat($processorURL, 'getparams?id=', $profile))"/>
27 <xsl:variable name="profiles" select="document(concat($processorURL, 'listprofiles'))//li"/>
29 <xsl:template match="node()">
31 <xsl:copy-of select="@*"/>
32 <xsl:apply-templates />
36 <xsl:template match="uwobo:key">
37 <xsl:variable name="name" select="@name"/>
38 <xsl:value-of select="string($params/html/body/ul/li[string(key)=$name]/value)"/>
41 <xsl:template match="uwobo:profile">
42 <xsl:value-of select="$profile"/>
45 <xsl:template match="uwobo:profileOptionList">
46 <xsl:apply-templates select="$profiles" mode="make_form_option"/>
49 <xsl:template match="uwobo:profileCtrlOptionList">
51 var cicurls = new Array();
53 <select onChange="window.open(cicurls[selectedIndex],'_top')">
54 <xsl:apply-templates select="$profiles" mode="make_ctrl_form_option">
55 <xsl:with-param name="type" select="@type"/>
56 </xsl:apply-templates>
60 <xsl:template match="li" mode="make_form_option">
61 <xsl:variable name="tmp" select="string(.)" />
62 <option value="{$tmp}">
63 <xsl:if test="$tmp=$profile">
64 <xsl:attribute name="selected">1</xsl:attribute>
66 <xsl:value-of select="$tmp"/>
70 <xsl:template match="li" mode="make_ctrl_form_option">
71 <xsl:param name="type" select="''"/>
73 <xsl:text>cicurls[</xsl:text>
74 <xsl:value-of select="position()-1" />
75 <xsl:text>] = "</xsl:text>
77 <xsl:when test="$type = 'cic'">
78 <subst:makeHTMLURLwithProfile profile="{string(.)}"/>
81 <subst:makeTheoryURLwithProfile profile="{string(.)}"/>
84 <xsl:text>";</xsl:text>
87 <option value="{position()}">
88 <xsl:if test="string(.)=$profile">
89 <xsl:attribute name="selected">1</xsl:attribute>
91 <xsl:value-of select="string(.)"/>