1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 |
|
---|
3 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
4 |
|
---|
5 | <xsl:output method="html"/>
|
---|
6 |
|
---|
7 | <xsl:template match="/">
|
---|
8 | <html>
|
---|
9 | <head>
|
---|
10 | <title>
|
---|
11 | <xsl:call-template name="metadataItem">
|
---|
12 | <xsl:with-param name="name">siteName</xsl:with-param>
|
---|
13 | </xsl:call-template>
|
---|
14 | </title>
|
---|
15 | <xsl:call-template name="cssFiles"/>
|
---|
16 | </head>
|
---|
17 | <body>
|
---|
18 | <div id="mainContentArea">
|
---|
19 | <h1>
|
---|
20 | <xsl:call-template name="metadataItem">
|
---|
21 | <xsl:with-param name="name">siteName</xsl:with-param>
|
---|
22 | </xsl:call-template>
|
---|
23 | </h1>
|
---|
24 |
|
---|
25 | <xsl:call-template name="metadataItem">
|
---|
26 | <xsl:with-param name="name">siteDescription</xsl:with-param>
|
---|
27 | </xsl:call-template>
|
---|
28 |
|
---|
29 | <h2>Collections:</h2>
|
---|
30 | <ul>
|
---|
31 | <xsl:for-each select="/page/pageResponse/collectionList/collection">
|
---|
32 | <li> <em> <xsl:value-of select="displayItem[@name='name']"/> </em> </li>
|
---|
33 | </xsl:for-each>
|
---|
34 | </ul>
|
---|
35 |
|
---|
36 | </div>
|
---|
37 |
|
---|
38 | <div id="footer">
|
---|
39 | <xsl:call-template name="uiItem">
|
---|
40 | <xsl:with-param name="name">footer</xsl:with-param>
|
---|
41 | </xsl:call-template>
|
---|
42 | </div>
|
---|
43 |
|
---|
44 |
|
---|
45 | </body>
|
---|
46 | </html>
|
---|
47 | </xsl:template>
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
51 |
|
---|
52 | <xsl:template name="cssFiles">
|
---|
53 |
|
---|
54 | <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
|
---|
55 | <link rel="stylesheet" href="{@path}" type="text/css"/>
|
---|
56 | </xsl:for-each>
|
---|
57 |
|
---|
58 | </xsl:template>
|
---|
59 |
|
---|
60 | <xsl:template name="metadataItem">
|
---|
61 | <xsl:param name="name"/>
|
---|
62 |
|
---|
63 | <xsl:variable name="x">
|
---|
64 | <xsl:value-of select="/page/pageResponse/metadataList/metadataItem[@name=$name]"/>
|
---|
65 | </xsl:variable>
|
---|
66 |
|
---|
67 | <xsl:choose>
|
---|
68 | <xsl:when test="$x = ''">
|
---|
69 | metadataItem '<xsl:value-of select="$name"/>' not defined.
|
---|
70 | </xsl:when>
|
---|
71 | <xsl:otherwise>
|
---|
72 | <xsl:value-of select="$x"/>
|
---|
73 | </xsl:otherwise>
|
---|
74 | </xsl:choose>
|
---|
75 |
|
---|
76 | </xsl:template>
|
---|
77 |
|
---|
78 | <xsl:template name="uiItem">
|
---|
79 | <xsl:param name="name"/>
|
---|
80 |
|
---|
81 | <xsl:variable name="x">
|
---|
82 | <xsl:value-of select="/page/pageResponse/uiItemList/uiItem[@name=$name]"/>
|
---|
83 | </xsl:variable>
|
---|
84 |
|
---|
85 | <xsl:choose>
|
---|
86 | <xsl:when test="$x = ''">
|
---|
87 | uiItem '<xsl:value-of select="$name"/>' not defined.
|
---|
88 | </xsl:when>
|
---|
89 | <xsl:otherwise>
|
---|
90 | <xsl:value-of select="$x"/>
|
---|
91 | </xsl:otherwise>
|
---|
92 | </xsl:choose>
|
---|
93 |
|
---|
94 | </xsl:template>
|
---|
95 |
|
---|
96 |
|
---|
97 | </xsl:stylesheet>
|
---|