Significant change in C# entities: instead of creating all collections for child objects at creation time of the parent object, now create them only when first requested. General tidyup in other files
This commit is contained in:
parent
97c62d4c86
commit
698c014b0d
|
@ -7,9 +7,9 @@
|
|||
|
||||
Transform ADL into entity classes
|
||||
|
||||
$Author: af $
|
||||
$Revision: 1.3 $
|
||||
$Date: 2008-02-28 14:56:05 $
|
||||
$Author: sb $
|
||||
$Revision: 1.4 $
|
||||
$Date: 2008-02-29 16:28:51 $
|
||||
-->
|
||||
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
|
@ -48,7 +48,7 @@
|
|||
stored to CVS -->
|
||||
|
||||
<xsl:variable name="transform-rev1"
|
||||
select="substring( '$Revision: 1.3 $', 11)"/>
|
||||
select="substring( '$Revision: 1.4 $', 11)"/>
|
||||
<xsl:variable name="transform-revision"
|
||||
select="substring( $transform-rev1, 0, string-length( $transform-rev1) - 1)"/>
|
||||
|
||||
|
@ -227,11 +227,11 @@
|
|||
private Regex <xsl:value-of select="@name"/>Validator = new Regex( "<xsl:value-of select="$validationpattern"/>");
|
||||
</xsl:if>
|
||||
|
||||
private <xsl:value-of select="$type"/> _<xsl:value-of select="@name"/> <xsl:value-of select="$initialiser"/>;
|
||||
private <xsl:value-of select="$type"/> <xsl:value-of select="concat( '_', @name)"/> <xsl:value-of select="$initialiser"/>;
|
||||
|
||||
public virtual <xsl:value-of select="$type"/><xsl:text> </xsl:text> <xsl:value-of select="@name"/>
|
||||
{
|
||||
get { return _<xsl:value-of select="@name"/>; }
|
||||
get { return <xsl:value-of select="concat( '_', @name)"/>; }
|
||||
set {
|
||||
<xsl:if test="@not-null='true' and $type-nullable='true'">
|
||||
if ( value == null)
|
||||
|
@ -283,7 +283,7 @@
|
|||
value = value.Substring( 0, <xsl:value-of select="@size"/>);
|
||||
}
|
||||
</xsl:if>
|
||||
_<xsl:value-of select="@name"/> = value;
|
||||
<xsl:value-of select="concat( '_', @name)"/> = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -304,12 +304,12 @@
|
|||
<xsl:template match="a:set[a:many-to-many]">
|
||||
// auto generating for set with name <xsl:value-of select="@name"/>, having many-to-many child
|
||||
private ICollection<<xsl:value-of
|
||||
select="a:many-to-many/@entity"/>><xsl:text> </xsl:text>_<xsl:value-of select="@name"/>;
|
||||
select="a:many-to-many/@entity"/>><xsl:text> </xsl:text><xsl:value-of select="concat( '_', @name)"/>;
|
||||
|
||||
public virtual ICollection<<xsl:value-of select="a:many-to-many/@entity"/>> <xsl:value-of select="@name"/>
|
||||
{
|
||||
get { return _<xsl:value-of select="@name"/>; }
|
||||
set { _<xsl:value-of select="@name"/> = value; }
|
||||
get { return <xsl:value-of select="concat( '_', @name)"/>; }
|
||||
set { <xsl:value-of select="concat( '_', @name)"/> = value; }
|
||||
}
|
||||
|
||||
</xsl:template>
|
||||
|
@ -317,12 +317,12 @@
|
|||
<xsl:template match="a:set[a:one-to-many]">
|
||||
// auto generating for set with name <xsl:value-of select="@name"/>, having one-to-many child
|
||||
private ICollection<<xsl:value-of
|
||||
select="a:one-to-many/@entity"/>><xsl:text> </xsl:text>_<xsl:value-of select="@name"/>;
|
||||
select="a:one-to-many/@entity"/>><xsl:text> </xsl:text><xsl:value-of select="concat( '_', @name)"/>;
|
||||
|
||||
public virtual ICollection<<xsl:value-of select="a:one-to-many/@entity"/>> <xsl:value-of select="@name"/>
|
||||
{
|
||||
get { return _<xsl:value-of select="@name"/>; }
|
||||
set { _<xsl:value-of select="@name"/> = value; }
|
||||
get { return <xsl:value-of select="concat( '_', @name)"/>; }
|
||||
set { <xsl:value-of select="concat( '_', @name)"/> = value; }
|
||||
}
|
||||
|
||||
</xsl:template>
|
||||
|
@ -373,7 +373,7 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="@concrete='false'"/>
|
||||
<xsl:otherwise>
|
||||
_<xsl:value-of select="@name"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
<xsl:value-of select="concat( '_', @name)"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
|
@ -381,7 +381,7 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="@concrete='false'"/>
|
||||
<xsl:otherwise>
|
||||
_<xsl:value-of select="@name"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
<xsl:value-of select="concat( '_', @name)"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
Transform ADL into entity classes
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.7 $
|
||||
$Date: 2008-02-27 17:38:41 $
|
||||
$Revision: 1.8 $
|
||||
$Date: 2008-02-29 16:28:51 $
|
||||
-->
|
||||
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
|
@ -32,8 +32,18 @@
|
|||
client's locale -->
|
||||
<xsl:param name="locale" select="en-UK"/>
|
||||
|
||||
<!--
|
||||
The convention to use for naming auto-generated abstract primary keys. Known values are
|
||||
Id - the autogenerated primary key, if any, is called just 'Id'
|
||||
Name - the autogenerated primary key has the same name as the entity
|
||||
NameId - the name of the auto generated primary key is the name of the entity followed by 'Id'
|
||||
Name_Id - the name of the auto generated primary key is the name of the entity followed by '_Id'
|
||||
-->
|
||||
<xsl:param name="abstract-key-name-convention" select="Id"/>
|
||||
|
||||
<!-- The C# namespace within which I shall generate controllers -->
|
||||
<xsl:param name="controllerns" select="Unset"/>
|
||||
|
||||
<!-- The C# namespace within which I shall generate entities -->
|
||||
<xsl:param name="entityns" select="Unset"/>
|
||||
|
||||
|
@ -51,10 +61,27 @@
|
|||
stored to CVS -->
|
||||
|
||||
<xsl:variable name="transform-rev1"
|
||||
select="substring( '$Revision: 1.7 $', 11)"/>
|
||||
select="substring( '$Revision: 1.8 $', 11)"/>
|
||||
<xsl:variable name="transform-revision"
|
||||
select="substring( $transform-rev1, 0, string-length( $transform-rev1) - 1)"/>
|
||||
|
||||
<xsl:variable name="keyfield">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$abstract-key-name-convention='Name'">
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$abstract-key-name-convention = 'NameId'">
|
||||
<xsl:value-of select="concat( @name, 'Id')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$abstract-key-name-convention = 'Name_Id'">
|
||||
<xsl:value-of select="concat( @name, '_Id')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'Id'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
/* ---- [ cut here: next file '<xsl:value-of select="@name"/>.auto.cs'] ---------------- */
|
||||
|
||||
//-------------------------------------------------------------
|
||||
|
@ -141,30 +168,30 @@
|
|||
{
|
||||
<xsl:call-template name="initialise-lists"/>
|
||||
|
||||
_<xsl:value-of select="@name"/>Id = key;
|
||||
<xsl:value-of select="concat( ' _', $keyfield)"/> = key;
|
||||
}
|
||||
/// <summary>
|
||||
/// Auto-generated iv for Id (abstract primary key) slot
|
||||
/// </summary>
|
||||
private int _<xsl:value-of select="@name"/>Id = -1;
|
||||
private int <xsl:value-of select="concat( ' _', $keyfield)"/> = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Auto-generated property for Id (abstract primary key) slot
|
||||
/// </summary>
|
||||
public virtual int <xsl:value-of select="@name"/>Id
|
||||
public virtual int <xsl:value-of select="$keyfield"/>
|
||||
{
|
||||
get { return _<xsl:value-of select="@name"/>Id; }
|
||||
set { _<xsl:value-of select="@name"/>Id = value; }
|
||||
get { return <xsl:value-of select="concat( ' _', $keyfield)"/>; }
|
||||
set { <xsl:value-of select="concat( ' _', $keyfield)"/> = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auto-generated overridden property for the Key slot, maps onto
|
||||
/// _<xsl:value-of select="@name"/>Id
|
||||
/// <xsl:value-of select="concat( ' _', $keyfield)"/>
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public override int Key
|
||||
{
|
||||
get { return _<xsl:value-of select="@name"/>Id; }
|
||||
get { return <xsl:value-of select="concat( ' _', $keyfield)"/>; }
|
||||
}
|
||||
|
||||
</xsl:otherwise>
|
||||
|
@ -269,8 +296,8 @@
|
|||
<xsl:when test="@cascade='all-delete-orphan'"/>
|
||||
<xsl:when test="@cascade='delete'"/>
|
||||
<xsl:otherwise>
|
||||
if ( _<xsl:value-of select="@name"/>.Count > 0) {
|
||||
bob.AppendFormat("Cannot delete this <xsl:value-of select="../@name"/> as it has {0} dependent <xsl:value-of select="@name"/>; ", _<xsl:value-of select="@name"/>.Count);
|
||||
if ( <xsl:value-of select="concat( ' _', @name)"/>.Count > 0) {
|
||||
bob.AppendFormat("Cannot delete this <xsl:value-of select="../@name"/> as it has {0} dependent <xsl:value-of select="@name"/>; ", <xsl:value-of select="concat( ' _', @name)"/>.Count);
|
||||
}
|
||||
|
||||
</xsl:otherwise>
|
||||
|
@ -361,7 +388,7 @@
|
|||
private Regex <xsl:value-of select="@name"/>Validator = new Regex( "<xsl:value-of select="$validationpattern"/>");
|
||||
</xsl:if>
|
||||
|
||||
private <xsl:value-of select="normalize-space( $csharp-type)"/><xsl:value-of select="normalize-space( $nullable-decoration)"/> _<xsl:value-of select="@name"/> <xsl:value-of select="normalize-space( $initialiser)"/>;
|
||||
private <xsl:value-of select="normalize-space( $csharp-type)"/><xsl:value-of select="normalize-space( $nullable-decoration)"/> <xsl:value-of select="concat( ' _', @name)"/> <xsl:value-of select="normalize-space( $initialiser)"/>;
|
||||
|
||||
/// <summary>
|
||||
/// <xsl:choose>
|
||||
|
@ -374,9 +401,17 @@
|
|||
/// </summary>
|
||||
public virtual <xsl:value-of select="normalize-space( $csharp-type)"/><xsl:value-of select="normalize-space( $nullable-decoration)"/><xsl:text> </xsl:text> <xsl:value-of select="@name"/>
|
||||
{
|
||||
get { return _<xsl:value-of select="@name"/>; }
|
||||
get {
|
||||
<xsl:if test="$base-type='list'">
|
||||
if ( <xsl:value-of select="concat( ' _', @name)"/> == null) {
|
||||
<xsl:value-of select="concat( '_', @name)"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
}
|
||||
</xsl:if>
|
||||
|
||||
return <xsl:value-of select="concat( ' _', @name)"/>;
|
||||
}
|
||||
set {
|
||||
<xsl:if test="@required='true'">
|
||||
<xsl:if test="@required='true'">
|
||||
if ( value == null)
|
||||
{
|
||||
throw new DataRequiredException( <xsl:choose>
|
||||
|
@ -425,7 +460,7 @@
|
|||
value = value.Substring( 0, <xsl:value-of select="@size"/>);
|
||||
}
|
||||
</xsl:if>
|
||||
_<xsl:value-of select="@name"/> = value;
|
||||
<xsl:value-of select="concat( ' _', @name)"/> = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,7 +509,7 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="@concrete='false'"/>
|
||||
<xsl:otherwise>
|
||||
_<xsl:value-of select="@name"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
<xsl:value-of select="concat( ' _', @name)"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
|
@ -482,7 +517,7 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="@concrete='false'"/>
|
||||
<xsl:otherwise>
|
||||
_<xsl:value-of select="@name"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
<xsl:value-of select="concat( ' _', @name)"/> = new HashedSet<<xsl:value-of select="@entity"/>>();
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
Convert ADL to MS-SQL
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.9 $
|
||||
$Revision: 1.10 $
|
||||
-->
|
||||
|
||||
<xsl:output indent="no" encoding="UTF-8" method="text"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
-- Application Description Language framework
|
||||
--
|
||||
-- Database for application <xsl:value-of select="@name"/> version <xsl:value-of select="@version"/>
|
||||
-- Generated for MS-SQL 2000+ using adl2mssql.xslt <xsl:value-of select="substring('$Revision: 1.9 $', 12)"/>
|
||||
-- Generated for MS-SQL 2000+ using adl2mssql.xslt <xsl:value-of select="substring('$Revision: 1.10 $', 12)"/>
|
||||
--
|
||||
-- Code generator (c) 2007 Cygnet Solutions Ltd
|
||||
--
|
||||
|
@ -360,10 +360,10 @@
|
|||
-------------------------------------------------------------------------------------------------
|
||||
CREATE TABLE "<xsl:value-of select="$linktablename"/>"
|
||||
(
|
||||
"<xsl:value-of select="$nearside"/>Id" <xsl:call-template name="sql-type">
|
||||
"<xsl:value-of select="concat( $nearside, 'Link')"/>" <xsl:call-template name="sql-type">
|
||||
<xsl:with-param name="property" select="//adl:entity[@name=$nearside]/adl:key/adl:property[position()=1]"/>
|
||||
</xsl:call-template> NOT NULL,
|
||||
"<xsl:value-of select="$farside"/>Id" <xsl:call-template name="sql-type">
|
||||
"<xsl:value-of select="concat( $farside, 'Link')"/>" <xsl:call-template name="sql-type">
|
||||
<xsl:with-param name="property" select="$farentity/adl:key/adl:property[position()=1]"/>
|
||||
</xsl:call-template> NOT NULL
|
||||
)
|
||||
|
@ -422,13 +422,13 @@
|
|||
<xsl:call-template name="foreignkey">
|
||||
<xsl:with-param name="nearside" select="$linktablename"/>
|
||||
<xsl:with-param name="farside" select="$neartable"/>
|
||||
<xsl:with-param name="keyfield" select="concat( $nearside, 'Id')"/>
|
||||
<xsl:with-param name="keyfield" select="concat( $nearside, 'Link')"/>
|
||||
<xsl:with-param name="ondelete" select="'NO ACTION'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="foreignkey">
|
||||
<xsl:with-param name="nearside" select="$linktablename"/>
|
||||
<xsl:with-param name="farside" select="$fartable"/>
|
||||
<xsl:with-param name="keyfield" select="concat( $farside, 'Id')"/>
|
||||
<xsl:with-param name="keyfield" select="concat( $farside, 'Link')"/>
|
||||
<xsl:with-param name="ondelete" select="'CASCADE'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<!--
|
||||
JACQUARD 2 APPLICATION DESCRIPTION LANGUAGE FRAMEWORK
|
||||
|
||||
$Revision: 1.3 $
|
||||
$Revision: 1.4 $
|
||||
|
||||
NOTES:
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
|||
-------------------------------------------------------------------------------------------------
|
||||
--
|
||||
-- Database for application <xsl:value-of select="@name"/> version <xsl:value-of select="@version"/>
|
||||
-- Generated for PostgreSQL [7|8] using adl2psql.xsl $Revision: 1.3 $
|
||||
-- Generated for PostgreSQL [7|8] using adl2psql.xsl $Revision: 1.4 $
|
||||
--
|
||||
-- Code generator (c) 2006 Simon Brooke [simon@weft.co.uk]
|
||||
-- http://www.weft.co.uk/library/jacquard/
|
||||
|
@ -89,7 +89,7 @@
|
|||
<xsl:template name="referentialintegrity">
|
||||
<xsl:param name="nearside"/>
|
||||
<!-- set up referential integrity constraints for primary tables -->
|
||||
ALTER TABLE <xsl:value-of select="$nearside"/> ADD CONSTRAINT ri_<xsl:value-of select="$nearside"/>_<xsl:value-of select="@name"/>
|
||||
ALTER TABLE <xsl:value-of select="$nearside"/> ADD CONSTRAINT ri_<xsl:value-of select="$nearside"/><xsl:value-of select="concat( '_', @name)"/>
|
||||
FOREIGN KEY ( <xsl:value-of select="@name"/>) REFERENCES <xsl:value-of select="@entity"/> ON DELETE NO ACTION;
|
||||
</xsl:template>
|
||||
|
||||
|
@ -127,9 +127,9 @@
|
|||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
-------------------------------------------------------------------------------------------------
|
||||
-- convenience view lv_<xsl:value-of select="@name"/> for lists
|
||||
-- convenience view lv<xsl:value-of select="concat( '_', @name)"/> for lists
|
||||
-------------------------------------------------------------------------------------------------
|
||||
CREATE VIEW lv_<xsl:value-of select="@name"/> AS
|
||||
CREATE VIEW lv<xsl:value-of select="concat( '_', @name)"/> AS
|
||||
SELECT <xsl:for-each select="property[@type!='link']">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='entity'">
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
Transform ADL into velocity view templates
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.5 $
|
||||
$Date: 2008-02-27 17:38:41 $
|
||||
$Revision: 1.6 $
|
||||
$Date: 2008-02-29 16:28:51 $
|
||||
-->
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
Whitespace (or lack of it) is significant! -->
|
||||
|
@ -43,7 +43,7 @@
|
|||
stored to CVS -->
|
||||
|
||||
<xsl:variable name="transform-rev1"
|
||||
select="substring( '$Revision: 1.5 $', 11)"/>
|
||||
select="substring( '$Revision: 1.6 $', 11)"/>
|
||||
<xsl:variable name="transform-revision"
|
||||
select="substring( $transform-rev1, 0, string-length( $transform-rev1) - 1)"/>
|
||||
|
||||
|
@ -61,6 +61,23 @@
|
|||
<!-- Don't bother generating anything for foreign entities -->
|
||||
|
||||
<xsl:template match="adl:entity">
|
||||
<xsl:variable name="keyfield">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$abstract-key-name-convention='Name'">
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$abstract-key-name-convention = 'NameId'">
|
||||
<xsl:value-of select="concat( @name, 'Id')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$abstract-key-name-convention = 'Name_Id'">
|
||||
<xsl:value-of select="concat( @name, '_Id')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'Id'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:apply-templates select="adl:form"/>
|
||||
<xsl:apply-templates select="adl:list"/>
|
||||
<xsl:text>
|
||||
|
@ -100,7 +117,7 @@
|
|||
<xsl:otherwise>
|
||||
<!-- there isn't a natural primary key; create a hidden widget
|
||||
for the abstract primary key -->
|
||||
${FormHelper.HiddenField( "instance.<xsl:value-of select="@name"/>Id")}
|
||||
${FormHelper.HiddenField( "instance.<xsl:value-of select="$keyfield"/>")}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<table>
|
||||
|
@ -301,7 +318,23 @@
|
|||
<xsl:otherwise>
|
||||
<!-- there isn't a natural primary key; create a hidden widget
|
||||
for the abstract primary key -->
|
||||
${FormHelper.HiddenField( "instance.<xsl:value-of select="ancestor::adl:entity/@name"/>Id")}
|
||||
<xsl:variable name="keyfield">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$abstract-key-name-convention='Name'">
|
||||
<xsl:value-of select="ancestor::adl:entity/@name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$abstract-key-name-convention = 'NameId'">
|
||||
<xsl:value-of select="concat( ancestor::adl:entity/@name, 'Id')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$abstract-key-name-convention = 'Name_Id'">
|
||||
<xsl:value-of select="concat( ancestor::adl:entity/@name, '_Id')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'Id'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
${FormHelper.HiddenField( "instance.<xsl:value-of select="$keyfield"/>")}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="adl:fieldgroup">
|
||||
|
@ -606,21 +639,13 @@
|
|||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="$oddness"/>
|
||||
</xsl:attribute>
|
||||
<td class="label" title="To edit this text, select it">
|
||||
<td class="label">
|
||||
${FormHelper.LabelFor( "instance.<xsl:value-of select="@name"/>", "<xsl:call-template name="showprompt">
|
||||
<xsl:with-param name="fallback" select="@name"/>
|
||||
</xsl:call-template>")}
|
||||
</td>
|
||||
<td class="widget" colspan="2">
|
||||
<xsl:variable name="url">
|
||||
$siteRoot/I18nMessage/edit.rails?Message_Id=<xsl:value-of select="concat( '$instance.', @name, '.MessageId')"/>
|
||||
</xsl:variable>
|
||||
<a target="_blank" class="i18nmessage">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="normalize-space( $url)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat( '$instance.', @name, '.LocalText')"/>
|
||||
</a>
|
||||
<xsl:value-of select="concat( '$t.Msg( $instance.', @name, ')')"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
@ -1126,13 +1151,16 @@
|
|||
$instance.<xsl:value-of select="@property"/>.ToString( 'd')
|
||||
#end
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::adl:entity/adl:property[@name=$prop]/@type='message'">
|
||||
$t.Msg( $instance.<xsl:value-of select="$prop"/>)
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::adl:entity/adl:property[@name=$prop]/@type='entity'">
|
||||
#if( $instance.<xsl:value-of select="$prop"/>)
|
||||
$instance.<xsl:value-of select="$prop"/>.UserIdentifier
|
||||
#end
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
$!instance.<xsl:value-of select="@name"/>
|
||||
$!instance.<xsl:value-of select="$prop"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue