summaryrefslogtreecommitdiff
path: root/officecfg/util/data_val.xsl
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-01-07 09:04:44 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-01-07 09:04:44 +0000
commit7b37bbf3a35f5b4b39333f9c8f7c9474efe0b27a (patch)
tree3df18c34ad0aca036df79cbab9193d8bd8cd68b7 /officecfg/util/data_val.xsl
parentbbaf21981e798bf2b802336c2f1a69c1c1565d25 (diff)
INTEGRATION: CWS cfgimpex (1.6.38); FILE MERGED
2004/12/10 07:58:01 jb 1.6.38.1: #i36020# Change handling of module-dependent values - now the module attribute is directly on the value; Add check for duplicate node names.
Diffstat (limited to 'officecfg/util/data_val.xsl')
-rw-r--r--officecfg/util/data_val.xsl49
1 files changed, 47 insertions, 2 deletions
diff --git a/officecfg/util/data_val.xsl b/officecfg/util/data_val.xsl
index ddabb4649d29..b0775a5c4ff1 100644
--- a/officecfg/util/data_val.xsl
+++ b/officecfg/util/data_val.xsl
@@ -3,9 +3,9 @@
*
* $RCSfile: data_val.xsl,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: hr $ $Date: 2004-11-09 11:49:05 $
+ * last change: $Author: rt $ $Date: 2005-01-07 10:04:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -159,6 +159,7 @@
</xsl:if>
<xsl:call-template name="checkModule"/>
+ <xsl:call-template name="checkDuplicates"/>
<xsl:choose>
<!-- look for matching templates in other components -->
@@ -222,7 +223,36 @@
</xsl:if>
<xsl:call-template name="checkModule"/>
+ <xsl:call-template name="checkDuplicates"/>
+ <xsl:apply-templates />
+ </xsl:template>
+
+<!-- ****************************************** -->
+<!-- * value *** -->
+<!-- ****************************************** -->
+ <xsl:template match="value">
+ <xsl:call-template name="checkModule"/>
+
+ <xsl:if test="@install:module">
+ <xsl:variable name = "path">
+ <xsl:call-template name="collectPath"/>
+ </xsl:variable>
+ <xsl:variable name = "module" select="@install:module"/>
+
+ <xsl:if test="@oor:lang">
+ <xsl:message terminate="yes">ERROR: Value in property '<xsl:value-of select="$path"/>' has module and locale!</xsl:message>
+ </xsl:if>
+ <xsl:if test="following-sibling::value[@install:module=$module]">
+ <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has multiple values for module <xsl:value-of select="$module"/>!</xsl:message>
+ </xsl:if>
+ <xsl:if test="../value[not(@install:module)]">
+ <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has values both with and without module. This is currently not supported. Please contact jb@openoffice.org, if you need this!</xsl:message>
+ </xsl:if>
+ <xsl:if test="not(preceding-sibling::value/@install:module)">
+ <xsl:message>ATTENTION: Property '<xsl:value-of select="$path"/>' has different values for different modules. Make sure the modules are mutually exclusive!</xsl:message>
+ </xsl:if>
+ </xsl:if>
</xsl:template>
<!-- ****************************************** -->
@@ -261,6 +291,21 @@
</xsl:choose>
<xsl:call-template name="checkModule"/>
+ <xsl:call-template name="checkDuplicates"/>
+ </xsl:template>
+
+
+<!-- ************************************* -->
+<!-- * checkDuplicates *** -->
+<!-- ************************************* -->
+ <xsl:template name="checkDuplicates">
+ <xsl:variable name="item-name" select="@oor:name"/>
+ <xsl:if test="following-sibling::*[@oor:name = $item-name]">
+ <xsl:variable name = "path">
+ <xsl:call-template name="collectPath"/>
+ </xsl:variable>
+ <xsl:message terminate="yes">ERROR: Duplicate node/prop '<xsl:value-of select="$path"/>'!</xsl:message>
+ </xsl:if>
</xsl:template>