summaryrefslogtreecommitdiff
path: root/officecfg/util/schema_val.xsl
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-01-07 09:05:13 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-01-07 09:05:13 +0000
commite611a1484b24cf8f4e98529f67b8baf599779649 (patch)
treebe7e1ab73fe3b8b5b39ecc85e3c188f42ba46a3a /officecfg/util/schema_val.xsl
parent970a2419fa5d731234a10b0093b3e54e5cfaf856 (diff)
INTEGRATION: CWS cfgimpex (1.7.28); FILE MERGED
2004/12/10 07:58:13 jb 1.7.28.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/schema_val.xsl')
-rw-r--r--officecfg/util/schema_val.xsl19
1 files changed, 17 insertions, 2 deletions
diff --git a/officecfg/util/schema_val.xsl b/officecfg/util/schema_val.xsl
index 6dfd092c3c44..b41d9a5d9085 100644
--- a/officecfg/util/schema_val.xsl
+++ b/officecfg/util/schema_val.xsl
@@ -3,9 +3,9 @@
*
* $RCSfile: schema_val.xsl,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: obo $ $Date: 2004-11-15 13:33:05 $
+ * last change: $Author: rt $ $Date: 2005-01-07 10:05:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,6 +79,11 @@
<xsl:apply-templates/>
</xsl:template>
+<!-- activate attribute templates -->
+ <xsl:template match="group|set|prop">
+ <xsl:apply-templates select="*|@*"/>
+ </xsl:template>
+
<!-- make sure that missing features are not invoked -->
<xsl:template match = "item">
<xsl:message terminate="yes">ERROR: multiple template types for sets are NOT supported!</xsl:message>
@@ -92,6 +97,7 @@
<xsl:if test="count(child::prop) or count(child::set) or count(child::group) or count(child::node-ref)">
<xsl:message terminate="yes">ERROR: extensible groups with children are currently NOT supported!</xsl:message>
</xsl:if>
+ <xsl:apply-templates select="*|@*"/>
</xsl:template>
<!-- Localized info elements (desc/label) are not supported currently -->
@@ -99,11 +105,20 @@
<xsl:message terminate="yes">ERROR: Info elements (desc/label) are currently not localized. Remove xml:lang attributes!</xsl:message>
</xsl:template>
+<!-- check for duplicate child names -->
+ <xsl:template match="@oor:name">
+ <xsl:variable name="item-name" select="."/>
+ <xsl:if test="../following-sibling::*[@oor:name = $item-name]">
+ <xsl:message terminate="yes">ERROR: Duplicate node name '<xsl:value-of select="$item-name"/>'!</xsl:message>
+ </xsl:if>
+ </xsl:template>
+
<!-- check if properties of type 'any' do not have a value -->
<xsl:template match="prop[@oor:type='oor:any']">
<xsl:if test="count(value)">
<xsl:message terminate="yes">ERROR: Properties of type 'oor:any' MUST NOT have a value!</xsl:message>
</xsl:if>
+ <xsl:apply-templates select="*|@*"/>
</xsl:template>
<!-- inhibit (explicit) NIL values -->