diff options
author | Jörg Barfurth <jb@openoffice.org> | 2002-11-22 10:48:55 +0000 |
---|---|---|
committer | Jörg Barfurth <jb@openoffice.org> | 2002-11-22 10:48:55 +0000 |
commit | 542333bc66714300eee0ee6efc871086c2ca3ede (patch) | |
tree | 25b562f921100f7c48f3ced3cbd602e69082a665 /officecfg/util | |
parent | 9c437c2096563196395f304c26d82c1c8b737910 (diff) |
#104662# Represent NIL defaults by absence of <value> tags only; xsi:nil is deprecated in the input
Diffstat (limited to 'officecfg/util')
-rw-r--r-- | officecfg/util/schema_trim.xsl | 27 | ||||
-rw-r--r-- | officecfg/util/schema_val.xsl | 14 |
2 files changed, 17 insertions, 24 deletions
diff --git a/officecfg/util/schema_trim.xsl b/officecfg/util/schema_trim.xsl index 899d661edc7d..fe8244983b2e 100644 --- a/officecfg/util/schema_trim.xsl +++ b/officecfg/util/schema_trim.xsl @@ -3,9 +3,9 @@ * * $RCSfile: schema_trim.xsl,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: tpf $ $Date: 2002-08-23 08:49:36 $ + * last change: $Author: jb $ $Date: 2002-11-22 11:48:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,30 +87,15 @@ <!-- suppress all documentation items --> <xsl:template match = "info"/> -<!-- suppress values, which do not have content and are not nil --> - <xsl:template match="value[@xsi:nil='true']"> - <xsl:if test="contains(../@oor:type, 'string') or contains(../@oor:type, 'hexBinary') or contains(../@oor:type, 'list')"> - <xsl:copy> - <xsl:apply-templates select="*|@*"/> - </xsl:copy> - </xsl:if> - </xsl:template> - +<!-- suppress values, which are marked as nil --> + <xsl:template match="value[@xsi:nil='true']" /> - <xsl:template match="value[@oor:separator]"> +<!-- copy all other values with content --> + <xsl:template match="value"> <xsl:copy> <xsl:apply-templates select="*|@*"/> <xsl:value-of select="."/> </xsl:copy> </xsl:template> - <xsl:template match="value"> - <xsl:if test="string-length(current())"> - <xsl:copy> - <xsl:apply-templates select="*|@*"/> - <xsl:value-of select="."/> - </xsl:copy> - </xsl:if> - </xsl:template> - </xsl:transform> diff --git a/officecfg/util/schema_val.xsl b/officecfg/util/schema_val.xsl index 2ba977ca4a36..2cf568ef9a09 100644 --- a/officecfg/util/schema_val.xsl +++ b/officecfg/util/schema_val.xsl @@ -3,9 +3,9 @@ * * $RCSfile: schema_val.xsl,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dg $ $Date: 2002-05-20 11:47:24 $ + * last change: $Author: jb $ $Date: 2002-11-22 11:48:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,7 +76,10 @@ <xsl:param name="file"/> <xsl:variable name="componentName"><xsl:value-of select="translate($file,$pathSeparator,'.')"/></xsl:variable> - <xsl:message terminate="yes">CHECKING CONSISTENCY ...</xsl:message> + <xsl:template match = "/"> + <xsl:message terminate="no">CHECKING CONSISTENCY ...</xsl:message> + <xsl:apply-templates/> + </xsl:template> <!-- make sure that missing features are not invoked --> <xsl:template match = "item"> @@ -100,6 +103,11 @@ </xsl:if> </xsl:template> +<!-- warn for (deprecated) NIL values --> + <xsl:template match="value[@xsi:nil]"> + <xsl:message terminate="no">WARNING: xsi:nil is deprecated in schemas and will be stripped !</xsl:message> + </xsl:template> + <!-- validate for correct node references --> <xsl:template match="@oor:node-type"> <xsl:choose> |