bzr branch
http://darksoft.org/webbzr/adei/trunk
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
1 |
<?xml version="1.0" encoding="utf-8"?>
|
2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
102
by Suren A. Chilingaryan
Various fixes |
3 |
<xsl:output method="html" encoding="utf-8"/> |
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
4 |
|
101
by Suren A. Chilingaryan
Further search improvements, support for custom properties (config) |
5 |
<xsl:template name="content"> |
6 |
<xsl:copy> |
|
7 |
<xsl:for-each select="@*|node()"> |
|
8 |
<xsl:call-template name="content"/> |
|
9 |
</xsl:for-each>
|
|
10 |
</xsl:copy>
|
|
11 |
</xsl:template>
|
|
12 |
||
205
by Suren A. Chilingaryan
Revert back to SetConfiguration from SetCustomProperties while handling certain property in search; trully support HTML content in description field within search results; support execution in XMLModule; support for setup-specific javascript code; KATRIN update |
13 |
<xsl:template match="Content|description"> |
101
by Suren A. Chilingaryan
Further search improvements, support for custom properties (config) |
14 |
<xsl:for-each select="@*|node()"> |
15 |
<xsl:call-template name="content"/> |
|
16 |
</xsl:for-each>
|
|
17 |
</xsl:template>
|
|
205
by Suren A. Chilingaryan
Revert back to SetConfiguration from SetCustomProperties while handling certain property in search; trully support HTML content in description field within search results; support execution in XMLModule; support for setup-specific javascript code; KATRIN update |
18 |
|
19 |
<xsl:template match="Value"> |
|
20 |
<xsl:element name="a"> |
|
21 |
<xsl:attribute name="href"> |
|
22 |
javascript:adei.SetConfiguration('<xsl:value-of select="@props"/>') |
|
23 |
</xsl:attribute>
|
|
24 |
<xsl:value-of select="@title"/> |
|
25 |
</xsl:element>
|
|
26 |
||
27 |
<xsl:if test="description"> |
|
28 |
<div><xsl:apply-templates select="description"/></div> |
|
29 |
</xsl:if>
|
|
30 |
<br/>
|
|
31 |
</xsl:template>
|
|
32 |
||
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
33 |
<xsl:template match="module"> |
34 |
<div>
|
|
101
by Suren A. Chilingaryan
Further search improvements, support for custom properties (config) |
35 |
<xsl:if test="@title"> |
36 |
<h4><xsl:value-of select="@title"/></h4> |
|
37 |
</xsl:if>
|
|
38 |
<xsl:if test="not(@title) and results"> |
|
39 |
<h4><xsl:value-of select="@name"/></h4> |
|
40 |
</xsl:if>
|
|
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
41 |
|
42 |
<xsl:if test="@description"> |
|
43 |
<div><xsl:value-of select="description"/></div> |
|
44 |
</xsl:if>
|
|
101
by Suren A. Chilingaryan
Further search improvements, support for custom properties (config) |
45 |
|
46 |
<xsl:if test="results"> |
|
47 |
<div>
|
|
48 |
<xsl:apply-templates select="results/Value"/> |
|
49 |
</div>
|
|
50 |
</xsl:if>
|
|
51 |
||
52 |
<xsl:if test="Content"> |
|
53 |
<xsl:apply-templates select="Content"/> |
|
54 |
<!--
|
|
55 |
<xsl:copy>
|
|
56 |
<xsl:call-template name="content" select="Content/@*|Content/node()"/>
|
|
57 |
<xsl:apply-templates select="content/@*|content/node()"/>
|
|
58 |
</xsl:copy>
|
|
59 |
-->
|
|
60 |
</xsl:if>
|
|
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
61 |
</div>
|
62 |
</xsl:template>
|
|
63 |
||
64 |
<xsl:template match="/result"> |
|
65 |
<div>
|
|
66 |
<xsl:if test="//Error"> |
|
67 |
<span class="error"><xsl:value-of select="//Error"/></span> |
|
68 |
</xsl:if>
|
|
69 |
||
101
by Suren A. Chilingaryan
Further search improvements, support for custom properties (config) |
70 |
|
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
71 |
<xsl:if test="not(//Error)"> |
101
by Suren A. Chilingaryan
Further search improvements, support for custom properties (config) |
72 |
<xsl:if test="not(//Value|//Content)"> |
73 |
Nothing is found |
|
74 |
</xsl:if>
|
|
75 |
||
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
76 |
<xsl:apply-templates select="module"/> |
77 |
</xsl:if>
|
|
102
by Suren A. Chilingaryan
Various fixes |
78 |
<xsl:if test="not(//Error)"> |
79 |
<xsl:if test="count(//Value)=1"> |
|
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
80 |
<xsl:if test="//Value[@certain]"> |
81 |
<script type="text/javascript"> |
|
205
by Suren A. Chilingaryan
Revert back to SetConfiguration from SetCustomProperties while handling certain property in search; trully support HTML content in description field within search results; support execution in XMLModule; support for setup-specific javascript code; KATRIN update |
82 |
adei.SetConfiguration(htmlEntityDecode('<xsl:value-of select="//Value/@props"/>')); |
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
83 |
</script>
|
84 |
</xsl:if>
|
|
102
by Suren A. Chilingaryan
Various fixes |
85 |
</xsl:if>
|
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
86 |
</xsl:if>
|
102
by Suren A. Chilingaryan
Various fixes |
87 |
</div>
|
100
by Suren A. Chilingaryan
Initial SEARCH implementation |
88 |
</xsl:template>
|
89 |
</xsl:stylesheet>
|