pass locale into named templates as parem; major improvements to auto-documentation

This commit is contained in:
sb 2009-05-13 17:52:33 +00:00
parent b87e01bd64
commit 3e8306ca6c
2 changed files with 452 additions and 279 deletions

View file

@ -14,7 +14,7 @@
<xsl:param name="detail" select="full"/> <xsl:param name="detail" select="full"/>
<xsl:template match="adl:application"> <xsl:template match="adl:application">
<html xmlns="http://www.w3.org/1999/xhtml"> <html>
<head> <head>
<title> <title>
Data definition for the <xsl:value-of select="@name"/> application Data definition for the <xsl:value-of select="@name"/> application
@ -42,6 +42,9 @@
</xsl:if> </xsl:if>
<xsl:apply-templates select="adl:documentation"/> <xsl:apply-templates select="adl:documentation"/>
<h2>Contents</h2> <h2>Contents</h2>
<dl>
<dt>Entities</dt>
<dd>
<dl> <dl>
<xsl:for-each select="adl:entity"> <xsl:for-each select="adl:entity">
<dt> <dt>
@ -57,18 +60,65 @@
</dd> </dd>
</xsl:for-each> </xsl:for-each>
</dl> </dl>
<xsl:for-each select="adl:entity"> </dd>
<dt>Defined types</dt>
<dd>
<dl>
<xsl:for-each select="adl:typedef">
<dt>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#typedef-', @name)"/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</dt>
</xsl:for-each>
</dl>
</dd>
<dt>Security groups</dt>
<dd>
<dl>
<xsl:for-each select="adl:group">
<dt>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#group-', @name)"/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</dt>
</xsl:for-each>
</dl>
</dd>
</dl>
<hr/>
<h2>Entities</h2>
<xsl:apply-templates select="adl:entity"/>
<hr/>
<h2>
Type Definitions
</h2>
<xsl:apply-templates select="adl:typedef"/>
<hr/>
<h2>Security groups</h2>
<xsl:apply-templates select="adl:group"/>
</body>
</html>
</xsl:template>
<xsl:template match="adl:entity">
<hr/>
<a> <a>
<xsl:attribute name="name"> <xsl:attribute name="name">
<xsl:value-of select="concat( 'entity-', @name)"/> <xsl:value-of select="concat( 'entity-', @name)"/>
</xsl:attribute> </xsl:attribute>
</a> </a>
<hr/> <h3>
<h2>
<xsl:value-of select="@name" /> <xsl:value-of select="@name" />
</h2> </h3>
<xsl:apply-templates select="adl:documentation"/> <xsl:apply-templates select="adl:documentation"/>
<h3>Access control</h3> <h4>Access control</h4>
<table> <table>
<tr> <tr>
<th>Group</th> <th>Group</th>
@ -77,7 +127,12 @@
<xsl:for-each select="adl:permission"> <xsl:for-each select="adl:permission">
<tr> <tr>
<td> <td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#group-', @group)"/>
</xsl:attribute>
<xsl:value-of select="@group"/> <xsl:value-of select="@group"/>
</a>
</td> </td>
<td> <td>
<xsl:value-of select="@permission"/> <xsl:value-of select="@permission"/>
@ -85,20 +140,42 @@
</tr> </tr>
</xsl:for-each> </xsl:for-each>
</table> </table>
<h3>Properties</h3> <h4>User interface</h4>
<ul>
<xsl:for-each select="adl:page|adl:list|adl:form">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#page-', ancestor::adl:entity/@name, '-', @name)"/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</li>
</xsl:for-each>
</ul>
<h4>Properties</h4>
<table> <table>
<tr class="header"> <tr class="header">
<th>Property</th> <th>Property</th>
<th>Type</th> <th>Type</th>
<xsl:if test="$detail = 'full'"> <xsl:if test="not( $detail) or $detail = 'full'">
<th>Req'd</th> <th>Req'd</th>
<th>Def'lt</th> <th>Def'lt</th>
<th>Size</th> <th>Size</th>
<th>Distinct</th> <th>Distinct</th>
<th>Prompt</th> <th>Prompt</th>
<th>Security overrides</th>
</xsl:if> </xsl:if>
</tr> </tr>
<xsl:for-each select=".//adl:property" > <xsl:apply-templates select=".//adl:property" />
</table>
<xsl:apply-templates select="adl:form"/>
<xsl:apply-templates select="adl:list"/>
<xsl:apply-templates select="adl:page"/>
<a href="#top">[back to top]</a>
</xsl:template>
<xsl:template match="adl:property">
<xsl:variable name="rowclass"> <xsl:variable name="rowclass">
<xsl:choose> <xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when> <xsl:when test="position() mod 2 = 0">even</xsl:when>
@ -109,6 +186,11 @@
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:value-of select="$rowclass"/> <xsl:value-of select="$rowclass"/>
</xsl:attribute> </xsl:attribute>
<a>
<xsl:attribute name="name">
<xsl:value-of select="concat( 'property-', ancestor::adl:entity/@name, '-', @name)"/>
</xsl:attribute>
</a>
<th> <th>
<xsl:value-of select="@name"/>&#160; <xsl:value-of select="@name"/>&#160;
</th> </th>
@ -147,29 +229,17 @@
<xsl:value-of select="@entity"/> <xsl:value-of select="@entity"/>
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="@definition"> <xsl:when test="@type='defined'">
: as <a>
<xsl:variable name="definition"> <xsl:attribute name="href">
<xsl:value-of select="@definition"/> <xsl:value-of select="concat( '#typedef-', @typedef)"/>
</xsl:variable> </xsl:attribute>
<xsl:variable name="defined-type"> <xsl:value-of select="@typedef"/>
<xsl:value-of select="/adl:application/adl:definition[@name=$definition]/@type"/> </a>
</xsl:variable>
<xsl:choose>
<xsl:when test="$defined-type = 'string'">
String matching
"<xsl:value-of select="/adl:application/adl:definition[@name=$definition]/@pattern"/>"
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/adl:application/adl:definition[@name=$definition]/@minimum"/> &lt;
<xsl:value-of select="@definition"/> &lt;
<xsl:value-of select="/adl:application/adl:definition[@name=$definition]/@maximum"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</td> </td>
<xsl:if test="$detail = 'full'"> <xsl:if test="not( $detail) or $detail = 'full'">
<td> <td>
<xsl:value-of select="@required"/>&#160; <xsl:value-of select="@required"/>&#160;
</td> </td>
@ -183,9 +253,24 @@
<xsl:value-of select="@distinct"/>&#160; <xsl:value-of select="@distinct"/>&#160;
</td> </td>
<td> <td>
<xsl:for-each select="adl:prompt">
<xsl:apply-templates select="adl:prompt"/>&#160; <xsl:apply-templates select="adl:prompt"/>&#160;
</td>
<td>
<dl>
<xsl:for-each select="adl:permission">
<dt>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#group-', @group)"/>
</xsl:attribute>
<xsl:value-of select="@group"/>
</a>
</dt>
<dd>
<xsl:value-of select="@permission"/>
</dd>
</xsl:for-each> </xsl:for-each>
</dl>
</td> </td>
</xsl:if> </xsl:if>
</tr> </tr>
@ -200,7 +285,7 @@
</xsl:attribute> </xsl:attribute>
Options: Options:
</td> </td>
<td> <td colspan="7">
<xsl:apply-templates select="adl:option[ position()=1]"/> <xsl:apply-templates select="adl:option[ position()=1]"/>
</td> </td>
<xsl:for-each select="adl:option[position() &gt; 1]"> <xsl:for-each select="adl:option[position() &gt; 1]">
@ -208,7 +293,7 @@
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:value-of select="$rowclass"/> <xsl:value-of select="$rowclass"/>
</xsl:attribute> </xsl:attribute>
<td> <td colspan="7">
<xsl:apply-templates select="."/> <xsl:apply-templates select="."/>
</td> </td>
</tr> </tr>
@ -251,15 +336,47 @@
</td> </td>
</tr> </tr>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:template>
</table>
<xsl:apply-templates select="form"/> <xsl:template match="adl:typedef">
<xsl:apply-templates select="list"/> <hr/>
<xsl:apply-templates select="page"/> <a>
<xsl:attribute name="name">
<xsl:value-of select="concat( 'typedef-', @name)"/>
</xsl:attribute>
</a>
<h3>
<xsl:value-of select="@name" />
</h3>
<p>
<xsl:choose>
<xsl:when test="@type = 'string'">
String matching
"<xsl:value-of select="@pattern"/>"
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@minimum"/> &lt;
<xsl:value-of select="@typedef"/> &lt;
<xsl:value-of select="@maximum"/>
</xsl:otherwise>
</xsl:choose>
</p>
<xsl:apply-templates select="adl:documentation"/>
<a href="#top">[back to top]</a>
</xsl:template>
<xsl:template match="adl:group">
<hr/>
<a>
<xsl:attribute name="name">
<xsl:value-of select="concat( 'group-', @name)"/>
</xsl:attribute>
</a>
<h3>
<xsl:value-of select="@name" />
</h3>
<xsl:apply-templates select="adl:documentation"/>
<a href="#top">[back to top]</a> <a href="#top">[back to top]</a>
</xsl:for-each>
</body>
</html>
</xsl:template> </xsl:template>
<xsl:template match="adl:prompt"> <xsl:template match="adl:prompt">
@ -267,6 +384,10 @@
if I'm the default prompt, show me only if there isn't if I'm the default prompt, show me only if there isn't
one for the default locale --> one for the default locale -->
<xsl:choose> <xsl:choose>
<xsl:when test="not($locale) and @locale='en-GB'">
<!-- something's not right with the locale parameter? -->
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="@locale=$locale"> <xsl:when test="@locale=$locale">
<xsl:value-of select="@prompt"/> <xsl:value-of select="@prompt"/>
</xsl:when> </xsl:when>
@ -279,6 +400,7 @@
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
<xsl:apply-templates/>
</xsl:template> </xsl:template>
<xsl:template match="adl:help"> <xsl:template match="adl:help">
@ -286,6 +408,10 @@
if I'm the default helptext, show me only if there isn't if I'm the default helptext, show me only if there isn't
one for the default locale --> one for the default locale -->
<xsl:choose> <xsl:choose>
<xsl:when test="not($locale) and @locale='en-GB'">
<!-- something's not right with the locale parameter? -->
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="@locale=$locale"> <xsl:when test="@locale=$locale">
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:when> </xsl:when>
@ -301,10 +427,10 @@
</xsl:template> </xsl:template>
<xsl:template match="adl:documentation"> <xsl:template match="adl:documentation">
<div xmlns="http://www.w3.org/1999/xhtml" class="documentation"> <div class="documentation">
<xsl:value-of select="."/> <xsl:value-of select="."/>
<xsl:if test="adl:reference"> <xsl:if test="adl:reference">
<h4>See also</h4> <h5>See also</h5>
<ul> <ul>
<xsl:apply-templates select="adl:reference"/> <xsl:apply-templates select="adl:reference"/>
</ul> </ul>
@ -315,7 +441,7 @@
<xsl:template match="adl:reference"> <xsl:template match="adl:reference">
<xsl:variable name="abbr" select="@abbr"/> <xsl:variable name="abbr" select="@abbr"/>
<xsl:variable name="specification" select="/adl:application/adl:specification[@abbr=$abbr]"/> <xsl:variable name="specification" select="/adl:application/adl:specification[@abbr=$abbr]"/>
<li xmlns="http://www.w3.org/1999/xhtml"> <li>
<xsl:choose> <xsl:choose>
<xsl:when test="@entity"> <xsl:when test="@entity">
<a> <a>
@ -329,7 +455,7 @@
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$specification/@url"> <xsl:when test="$specification/@url">
<a xmlns="http://www.w3.org/1999/xhtml"> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:choose> <xsl:choose>
<xsl:when test="@section"> <xsl:when test="@section">
@ -359,20 +485,31 @@
</xsl:template> </xsl:template>
<xsl:template match="adl:form"> <xsl:template match="adl:form">
<div xmlns="http://www.w3.org/1999/xhtml"> <div class="form">
<h3 xmlns="http://www.w3.org/1999/xhtml"> <a>
Form <xsl:value-of select="@name"/> <xsl:attribute name="name">
</h3> <xsl:value-of select="concat('page-', ancestor::adl:entity/@name, '-', @name)"/>
</xsl:attribute>
</a>
<h4>
Form '<xsl:value-of select="@name"/>' of entity
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#entity-', ancestor::adl:entity/@name)"/>
</xsl:attribute>
<xsl:value-of select="ancestor::adl:entity/@name"/>
</a>
</h4>
<xsl:if test="adl:permission"> <xsl:if test="adl:permission">
<h4 xmlns="http://www.w3.org/1999/xhtml">Permissions</h4> <h5>Permissions</h5>
<ul xmlns="http://www.w3.org/1999/xhtml"> <ul>
<xsl:apply-templates select="permission"/> <xsl:apply-templates select="permission"/>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:choose> <xsl:choose>
<xsl:when test="@properties='listed'"> <xsl:when test="@properties='listed'">
<p>Showing the following properties</p> <p>Showing the following properties</p>
<table xmlns="http://www.w3.org/1999/xhtml"> <table>
<tr> <tr>
<th>&#160;</th> <th>&#160;</th>
<th>Property</th> <th>Property</th>
@ -390,19 +527,30 @@
</xsl:template> </xsl:template>
<xsl:template match="adl:page"> <xsl:template match="adl:page">
<div xmlns="http://www.w3.org/1999/xhtml"> <div class="page">
<h3 xmlns="http://www.w3.org/1999/xhtml"> <a>
Page <xsl:value-of select="@name"/> <xsl:attribute name="name">
</h3> <xsl:value-of select="concat('page-', ancestor::adl:entity/@name, '-', @name)"/>
</xsl:attribute>
</a>
<h4>
Page '<xsl:value-of select="@name"/>' of entity
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#entity-', ancestor::adl:entity/@name)"/>
</xsl:attribute>
<xsl:value-of select="ancestor::adl:entity/@name"/>
</a>
</h4>
<xsl:if test="adl:permission"> <xsl:if test="adl:permission">
<ul xmlns="http://www.w3.org/1999/xhtml"> <ul>
<xsl:apply-templates select="permission"/> <xsl:apply-templates select="permission"/>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:choose> <xsl:choose>
<xsl:when test="@properties='listed'"> <xsl:when test="@properties='listed'">
<p>Showing the following properties</p> <p>Showing the following properties</p>
<table xmlns="http://www.w3.org/1999/xhtml"> <table>
<tr> <tr>
<th>&#160;</th> <th>&#160;</th>
<th>Property</th> <th>Property</th>
@ -420,19 +568,36 @@
</xsl:template> </xsl:template>
<xsl:template match="adl:list"> <xsl:template match="adl:list">
<div xmlns="http://www.w3.org/1999/xhtml"> <div class="list">
<h3 xmlns="http://www.w3.org/1999/xhtml"> <a>
List <xsl:value-of select="@name"/>, on select <xsl:value-of select="@onselect"/> <xsl:attribute name="name">
</h3> <xsl:value-of select="concat('page-', ancestor::adl:entity/@name, '-', @name)"/>
</xsl:attribute>
</a>
<h4>
List '<xsl:value-of select="@name"/>' of entity
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#entity-', ancestor::adl:entity/@name)"/>
</xsl:attribute>
<xsl:value-of select="ancestor::adl:entity/@name"/>
</a>, on select
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#page-', ancestor::adl:entity/@name, '-', @onselect)"/>
</xsl:attribute>
<xsl:value-of select="@onselect"/>
</a>
</h4>
<xsl:if test="adl:permission"> <xsl:if test="adl:permission">
<ul xmlns="http://www.w3.org/1999/xhtml"> <ul>
<xsl:apply-templates select="adl:permission"/> <xsl:apply-templates select="adl:permission"/>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:choose> <xsl:choose>
<xsl:when test="@properties='listed'"> <xsl:when test="@properties='listed'">
<p>Showing the following properties</p> <p>Showing the following properties</p>
<table xmlns="http://www.w3.org/1999/xhtml"> <table>
<tr> <tr>
<th>&#160;</th> <th>&#160;</th>
<th>Property</th> <th>Property</th>
@ -450,7 +615,7 @@
</xsl:template> </xsl:template>
<xsl:template match="adl:field"> <xsl:template match="adl:field">
<tr xmlns="http://www.w3.org/1999/xhtml"> <tr>
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:choose> <xsl:choose>
<xsl:when test="parent::adl:fieldgroup"> <xsl:when test="parent::adl:fieldgroup">
@ -469,7 +634,12 @@
</xsl:attribute> </xsl:attribute>
<td>Field</td> <td>Field</td>
<td> <td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat( '#property-', ancestor::adl:entity/@name, '-', @property)"/>
</xsl:attribute>
<xsl:value-of select="@property"/> <xsl:value-of select="@property"/>
</a>
</td> </td>
<td> <td>
<xsl:apply-templates select="adl:prompt"/> <xsl:apply-templates select="adl:prompt"/>
@ -482,7 +652,7 @@
</td> </td>
</tr> </tr>
<xsl:if test="adl:permission"> <xsl:if test="adl:permission">
<tr xmlns="http://www.w3.org/1999/xhtml"> <tr>
<td></td> <td></td>
<td colspan="3"> <td colspan="3">
<xsl:apply-templates select="adl:permission"/> <xsl:apply-templates select="adl:permission"/>
@ -493,7 +663,7 @@
<xsl:template match="adl:verb"> <xsl:template match="adl:verb">
<tr xmlns="http://www.w3.org/1999/xhtml"> <tr>
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:choose> <xsl:choose>
<xsl:when test="parent::adl:fieldgroup"> <xsl:when test="parent::adl:fieldgroup">
@ -526,7 +696,7 @@
</td> </td>
</tr> </tr>
<xsl:if test="adl:permission"> <xsl:if test="adl:permission">
<tr xmlns="http://www.w3.org/1999/xhtml"> <tr>
<td></td> <td></td>
<td colspan="3"> <td colspan="3">
<xsl:apply-templates select="adl:permission"/> <xsl:apply-templates select="adl:permission"/>
@ -538,7 +708,7 @@
<xsl:template match="adl:auxlist"> <xsl:template match="adl:auxlist">
<tr xmlns="http://www.w3.org/1999/xhtml" class="auxlist-start"> <tr class="auxlist-start">
<th>Auxlist</th> <th>Auxlist</th>
<th> <th>
<xsl:value-of select="@property"/> <xsl:value-of select="@property"/>
@ -553,10 +723,27 @@
<xsl:apply-templates select="adl:documentation"/> <xsl:apply-templates select="adl:documentation"/>
</th> </th>
</tr> </tr>
<tr xmlns="http://www.w3.org/1999/xhtml" class="auxlist"> <tr class="auxlist">
<th>On select:</th> <th>
<xsl:if test="@onselect">On select:</xsl:if></th>
<td> <td>
<a>
<xsl:attribute name="href">
<xsl:variable name="propname" select="@property"/>
<xsl:variable name="targetent">
<xsl:choose>
<xsl:when test="ancestor::adl:entity//adl:property[@name=$propname]/@entity">
<xsl:value-of select="ancestor::adl:entity//adl:property[@name=$propname]/@entity"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="ancestor::adl:entity/@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="concat( '#page-', $targetent, '-', @onselect)"/>
</xsl:attribute>
<xsl:value-of select="@onselect"/> <xsl:value-of select="@onselect"/>
</a>
</td> </td>
<td colspan="2"> <td colspan="2">
<xsl:choose> <xsl:choose>
@ -573,8 +760,8 @@
</xsl:template> </xsl:template>
<xsl:template match="adl:fieldgroup"> <xsl:template match="adl:fieldgroup">
<tr xmlns="http://www.w3.org/1999/xhtml" class="fieldgroup-start"> <tr class="fieldgroup-start">
<th>Auxlist</th> <th>Field group</th>
<th> <th>
<xsl:value-of select="@name"/> <xsl:value-of select="@name"/>
</th> </th>
@ -588,22 +775,6 @@
<xsl:apply-templates select="adl:documentation"/> <xsl:apply-templates select="adl:documentation"/>
</th> </th>
</tr> </tr>
<tr xmlns="http://www.w3.org/1999/xhtml" class="adl:auxlist">
<th>On select:</th>
<td>
<xsl:value-of select="@onselect"/>
</td>
<td colspan="2">
<xsl:choose>
<xsl:when test="@properties='listed'">
Showing the following properties
</xsl:when>
<xsl:otherwise>
Showing all properties
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:apply-templates select="adl:field|adl:fieldgroup|adl:auxlist|adl:verb"/> <xsl:apply-templates select="adl:field|adl:fieldgroup|adl:auxlist|adl:verb"/>
</xsl:template> </xsl:template>
@ -613,7 +784,7 @@
: <xsl:apply-templates select="adl:prompt"/> : <xsl:apply-templates select="adl:prompt"/>
</xsl:if> </xsl:if>
<xsl:if test="adl:help"> <xsl:if test="adl:help">
(<i xmlns="http://www.w3.org/1999/xhtml"> (<i>
<xsl:apply-templates select="adl:prompt"/> <xsl:apply-templates select="adl:prompt"/>
</i>) </i>)
</xsl:if> </xsl:if>

View file

@ -15,14 +15,19 @@
Transform ADL into velocity view templates Transform ADL into velocity view templates
$Author: sb $ $Author: sb $
$Revision: 1.60 $ $Revision: 1.61 $
$Date: 2009-05-12 15:43:18 $ $Date: 2009-05-13 17:52:33 $
--> -->
<!-- WARNING WARNING WARNING: Do NOT reformat this file! <!-- WARNING WARNING WARNING: Do NOT reformat this file!
Whitespace (or lack of it) is significant! --> Whitespace (or lack of it) is significant! -->
<xsl:include href="base-type-include.xslt"/> <xsl:include href="base-type-include.xslt"/>
<xsl:include href="permissions-include.xslt"/> <xsl:include href="permissions-include.xslt"/>
<!-- bug 1896 : boilerplate text in views should be tailored to the locale of
the expected user. Unfortunately I haven't yet worked out how to do
conditional includes in XSLT, so this is a step on the way to a solution,
not a solution in itself. -->
<xsl:include href="i18n-en-GB-include.xslt"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8" omit-xml-declaration="yes"/> <xsl:output method="xml" indent="yes" encoding="UTF-8" omit-xml-declaration="yes"/>
@ -31,12 +36,6 @@
yet implemented. When it is we will almost certainly still need a 'default locale' --> yet implemented. When it is we will almost certainly still need a 'default locale' -->
<xsl:param name="locale" select="en-GB"/> <xsl:param name="locale" select="en-GB"/>
<!-- bug 1896 : boilerplate text in views should be tailored to the locale of
the expected user. Unfortunately I haven't yet worked out how to do
conditional includes in XSLT, so this is a step on the way to a solution,
not a solution in itself. -->
<xsl:include href="i18n-en-GB-include.xslt"/>
<!-- whether or not to auto-generate site navigation - by default, don't --> <!-- whether or not to auto-generate site navigation - by default, don't -->
<xsl:param name="generate-site-navigation" select="'false'"/> <xsl:param name="generate-site-navigation" select="'false'"/>
@ -288,6 +287,7 @@
<xsl:call-template name="head"/> <xsl:call-template name="head"/>
<xsl:call-template name="generate-head-javascript"> <xsl:call-template name="generate-head-javascript">
<xsl:with-param name="form" select="."/> <xsl:with-param name="form" select="."/>
<xsl:with-param name="locale" select="$locale"/>
</xsl:call-template> </xsl:call-template>
${StylesHelper.InstallStylesheet( "Epoch")} ${StylesHelper.InstallStylesheet( "Epoch")}
@ -351,6 +351,7 @@
<xsl:call-template name="install-scripts"/> <xsl:call-template name="install-scripts"/>
<xsl:call-template name="generate-head-javascript"> <xsl:call-template name="generate-head-javascript">
<xsl:with-param name="form" select="."/> <xsl:with-param name="form" select="."/>
<xsl:with-param name="locale" select="$locale"/>
</xsl:call-template> </xsl:call-template>
${StylesHelper.InstallStylesheet( "Epoch")} ${StylesHelper.InstallStylesheet( "Epoch")}
@ -1501,6 +1502,7 @@
<xsl:param name="form"> <xsl:param name="form">
<!-- assumed to be an instance of adl:form --> <!-- assumed to be an instance of adl:form -->
</xsl:param> </xsl:param>
<xsl:param name="locale"/>
<script type='text/javascript' language='JavaScript1.2'> <script type='text/javascript' language='JavaScript1.2'>
#if ( ${site-root}) #if ( ${site-root})
var siteRoot = '$siteRoot'; var siteRoot = '$siteRoot';
@ -1848,7 +1850,7 @@
Auto generated Velocity macro for <xsl:value-of select="@name"/>, Auto generated Velocity macro for <xsl:value-of select="@name"/>,
generated from ADL. generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.60 $', 10)"/> Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.61 $', 10)"/>
Generation parameters were: Generation parameters were:
area-name: <xsl:value-of select="$area-name"/> area-name: <xsl:value-of select="$area-name"/>
default-url: <xsl:value-of select="$default-url"/> default-url: <xsl:value-of select="$default-url"/>