bug 2869, 2871, 2877, 2878 : Sweep up of cosmetic bugs requiring ADL language/transform changes.

status 2869, 2871, 2877, 2878 : resolved FIXED
This commit is contained in:
sb 2009-04-30 17:03:59 +00:00
parent e83ba2c9ac
commit bd2690ecdd
4 changed files with 149 additions and 149 deletions

View file

@ -13,7 +13,7 @@
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!--
$Revision: 1.2 $
$Revision: 1.3 $
-->
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
@ -258,9 +258,8 @@ that we can allow HTML block level entities within content elements -->
foreign: this entity is part of some other system; no code will be generated
for it, although code which links to it will be generated
-->
<!ELEMENT entity ( documentation?, content?, key?,
(property)*,
permission*, (form | page | list)*)>
<!ELEMENT entity ( documentation?, prompt*, content?, key?,
property*, permission*, (form | page | list)*)>
<!ATTLIST entity
name CDATA #REQUIRED
natural-key CDATA #IMPLIED

View file

@ -20,8 +20,8 @@
explicitly state the permission, even if it is 'none'.
$Author: sb $
$Revision: 1.7 $
$Date: 2009-04-28 13:53:17 $
$Revision: 1.8 $
$Date: 2009-04-30 17:04:00 $
-->
<xsl:stylesheet version="1.0"
@ -74,7 +74,7 @@
* THIS FILE IS AUTOMATICALLY GENERATED AND SHOULD NOT
* BE MANUALLY EDITED.
*
* Generated using adl2canonical.xslt <xsl:value-of select="substring('$Revision: 1.7 $', 12)"/>
* Generated using adl2canonical.xslt <xsl:value-of select="substring('$Revision: 1.8 $', 12)"/>
*
***************************************************************************
</xsl:comment>
@ -118,7 +118,7 @@
<xsl:apply-templates select="adl:property[@name=$nkey]"/>
<xsl:apply-templates select="adl:key/adl:property"/>
</key>
<xsl:apply-templates select="adl:property[not(@name=$nkey)] | adl:one-to-many | adl:many-to-many | adl:many-to-one"/>
<xsl:apply-templates select="adl:prompt | adl:property[not(@name=$nkey)] | adl:one-to-many | adl:many-to-many | adl:many-to-one"/>
<xsl:variable name="entity" select="."/>
<xsl:for-each select="//adl:group">
@ -193,7 +193,7 @@
</documentation>
</property>
</key>
<xsl:apply-templates select="adl:property | adl:one-to-many | adl:many-to-many | adl:many-to-one"/>
<xsl:apply-templates select="adl:prompt | adl:property | adl:one-to-many | adl:many-to-many | adl:many-to-one"/>
<xsl:variable name="entity" select="."/>
<xsl:for-each select="//adl:group">

View file

@ -8,8 +8,8 @@
Transform ADL into C# entity classes
$Author: sb $
$Revision: 1.20 $
$Date: 2009-04-28 13:44:51 $
$Revision: 1.21 $
$Date: 2009-04-30 17:04:00 $
-->
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
@ -70,7 +70,7 @@
// (c)2007 Cygnet Solutions Ltd
//
// Automatically generated from application description using
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/>
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>
//
// <xsl:value-of select="/adl:application/@revision"/>
//
@ -97,7 +97,7 @@
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// Automatically generated from description of group <xsl:value-of select="@name"/>
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/>.
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>.
///
/// DO NOT EDIT THIS FILE!
/// &lt;/remarks&gt;
@ -123,7 +123,7 @@
// (c)2007 Cygnet Solutions Ltd
//
// Automatically generated from application description using
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/>
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>
//
// <xsl:value-of select="/adl:application/@revision"/>
//
@ -149,7 +149,7 @@
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// Automatically generated from description of entity <xsl:value-of select="@name"/>
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.20 $', 10)"/>.
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.21 $', 10)"/>.
/// Note that manually maintained parts of this class may be defined in
/// a separate file called <xsl:value-of select="@name"/>.manual.cs, q.v.
///
@ -314,7 +314,7 @@
<xsl:choose>
<xsl:when test="position() = last()"/>
<xsl:otherwise>
result.Append( ",");
result.Append( ", ");
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>

View file

@ -15,8 +15,8 @@
Transform ADL into velocity view templates
$Author: sb $
$Revision: 1.40 $
$Date: 2009-04-30 08:56:33 $
$Revision: 1.41 $
$Date: 2009-04-30 17:04:00 $
-->
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
Whitespace (or lack of it) is significant! -->
@ -422,24 +422,16 @@
<table>
<xsl:choose>
<xsl:when test="@properties='listed'">
<xsl:apply-templates select="$form/adl:field|adl:auxlist|adl:verb"/>
<xsl:apply-templates select="$form/adl:field|adl:auxlist"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$form/ancestor::adl:entity/adl:property"/>
</xsl:otherwise>
</xsl:choose>
</table>
<ul class="verbs">
<xsl:choose>
<xsl:when test="$authentication-layer='Database'">
<xsl:variable name="savegroups">
<xsl:call-template name="entity-save-groups">
<xsl:with-param name="entity" select="$form/ancestor::adl:entity"/>
</xsl:call-template>
</xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause
cause the Velocity parser to break! -->
#if ( <xsl:for-each select="exsl:node-set( $savegroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
<xsl:call-template name="save-widget-row"/>
#end
<xsl:variable name="deletegroups">
<xsl:call-template name="entity-delete-groups">
<xsl:with-param name="entity" select="$form/ancestor::adl:entity"/>
@ -447,16 +439,26 @@
</xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause
cause the Velocity parser to break! -->
#if ( <xsl:for-each select="exsl:node-set( $deletegroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
#if ( <xsl:for-each select="exsl:node-set( $deletegroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} || </xsl:for-each> false)
<xsl:call-template name="delete-widget-row"/>
#end
<xsl:variable name="savegroups">
<xsl:call-template name="entity-save-groups">
<xsl:with-param name="entity" select="$form/ancestor::adl:entity"/>
</xsl:call-template>
</xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause
cause the Velocity parser to break! -->
#if ( <xsl:for-each select="exsl:node-set( $savegroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
<xsl:call-template name="save-widget-row"/>
#end
</xsl:when>
<xsl:when test="$authentication-layer='Application'">
<xsl:call-template name="save-widget-row"/>
<xsl:call-template name="delete-widget-row"/>
<xsl:call-template name="save-widget-row"/>
</xsl:when>
</xsl:choose>
</table>
</ul>
</div>
</form>
</div>
@ -464,38 +466,32 @@
<!-- output a complete table row containing a save widget -->
<xsl:template name="save-widget-row">
<tr class="actionSafe">
<td class="actionSafe" colspan="2">
<li class="standard-verb actionSafe">
<button type="submit" name="command" value="store">
<xsl:attribute name="title">
<xsl:call-template name='i18n-save-prompt'/>
</td>
<td class="actionSafe" style="text-align:right">
<button type="submit" name="command" value="store">Save this!</button>
</td>
</tr>
</xsl:attribute>
Save
</button>
</li>
</xsl:template>
<!-- output a complete table row containing a delete widget -->
<xsl:template name="delete-widget-row">
<tr align="left" valign="top" class="actionDangerous">
<td class="actionDangerous" colspan="2">
#if ( $instance)
#if ( $instance.NoDeleteReason)
[ $instance.NoDeleteReason ]
#else
<xsl:call-template name="i18n-delete-prompt"/>
#end
#end
</td>
<td class="actionDangerous" style="text-align:right">
<li class="standard-verb actionDangerous">
#if ( $instance)
#if ( $instance.NoDeleteReason)
<button type="submit" disabled="disabled" title="$instance.NoDeleteReason" name="command" value="delete">Delete this!</button>
#else
<button type="submit" name="command" value="delete">Delete this!</button>
<button type="submit" name="command" value="delete">
<xsl:attribute name="title">
<xsl:call-template name="i18n-delete-prompt"/>
</xsl:attribute>
Delete this!
</button>
#end
#end
</td>
</tr>
</li>
</xsl:template>
<xsl:template match="adl:fieldgroup">
@ -507,7 +503,6 @@
</xsl:call-template>
</xsl:variable>
<!-- NOTE! NOTE! NOTE! Whitespace is significant - any linefeeds inside the #if ( ) clause cause the Velocity parser to break! -->
<xsl:comment>If the user can't read the fieldgroup, don't output it at all.</xsl:comment>
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
</xsl:if>
@ -530,8 +525,13 @@
</xsl:call-template>
</h3>
<table>
<xsl:apply-templates select="adl:field|adl:verb|adl:auxlist"/>
<xsl:apply-templates select="adl:field|adl:auxlist"/>
</table>
<xsl:if test="adl:verb">
<ul class="verbs">
<xsl:apply-templates select="adl:verb"/>
</ul>
</xsl:if>
</div>
<xsl:if test="$authentication-layer = 'Database'">
#end
@ -629,31 +629,23 @@
<!-- don't emit a verb unless there is an instance for it to act on -->
#if( $instance)
#if( ! $instance.IsNew)
<tr>
<ul>
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
</xsl:attribute>
<td colspan="2">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
</xsl:attribute>
<xsl:apply-templates select="adl:help[@locale = $locale]"/>
</td>
<td style="text-align:right">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
<xsl:value-of select="concat( 'custom-verb ', $class)"/>
</xsl:attribute>
<button name="command">
<xsl:attribute name="value">
<xsl:value-of select="@verb"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:apply-templates select="adl:help[@locale = $locale]"/>
</xsl:attribute>
<xsl:call-template name="showprompt">
<xsl:with-param name="node" select="."/>
<xsl:with-param name="fallback" select="@verb"/>
</xsl:call-template>
</button>
</td>
</tr>
</ul>
#end
#end
#end
@ -837,7 +829,6 @@
<xsl:if test="$authentication-layer = 'Database'">
<xsl:choose>
<xsl:when test="exsl:node-set( $readgroups)/*">
<xsl:comment>if the user can't even read the field, don't output it at all.</xsl:comment>
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} || </xsl:for-each> false)
</xsl:when>
<xsl:otherwise>
@ -1762,7 +1753,7 @@
Auto generated Velocity macro for <xsl:value-of select="@name"/>,
generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.40 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.41 $', 10)"/>
Generation parameters were:
area-name: <xsl:value-of select="$area-name"/>
default-url: <xsl:value-of select="$default-url"/>
@ -1810,6 +1801,7 @@
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="current-entity" select="ancestor::adl:entity/@name"/>
<xsl:if test="$generate-site-navigation = 'true'">
<ul class="generatednav">
<xsl:for-each select="//adl:entity[adl:list[@name='list']]">
@ -1819,9 +1811,15 @@
</xsl:call-template>
</xsl:variable>
<xsl:if test="$authentication-layer = 'Database'">
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*">${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
#if ( <xsl:for-each select="exsl:node-set( $readgroups)/*"> ${SecurityHelper.InGroup( "<xsl:value-of select="./@name"/>")} ||</xsl:for-each> false)
</xsl:if>
<li class="navigation">
<li>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@name = $current-entity">selected-nav</xsl:when>
<xsl:otherwise>navigation</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:choose>
@ -1843,10 +1841,13 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="@name"/>
<xsl:call-template name="showprompt">
<xsl:with-param name="fallback" select="@name"/>
<xsl:with-param name="entity" select="."/>
</xsl:call-template>
</a>
</li>
<xsl:if test="$authentication-layer != 'Application'">
<xsl:if test="$authentication-layer = 'Database'">
#end
</xsl:if>
</xsl:for-each>