summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 10:49:05 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 10:49:05 +0000
commit6c98568abba18be2ddd24da8d7bf906168b58dc6 (patch)
tree473d1a8b1193d6b2f0f4798426b6ef9e667f1862
parenta5fa82ff5d0c1abbe009c007757cf63147098c78 (diff)
INTEGRATION: CWS nojava1 (1.5.58); FILE MERGED
2004/08/23 11:46:09 jb 1.5.58.2: #i33238# Use xs:functionAvailable to check availability of used extension function (currently only with XT/Java). If makeAbs is unavailable, simply use the relative path. This works at least for xsltproc. Also some small corrections to fix violations of the XSLT DTD. Contributor: Josh Triplett <jtriplett@openoffice.org> 2004/08/23 11:32:39 jb 1.5.58.1: #i32143# Correct whitespace handling in composeFileURL, which was broken for xsltproc. Contributor: Josh Triplett <jtriplett@openoffice.org>
-rw-r--r--officecfg/util/data_val.xsl22
1 files changed, 16 insertions, 6 deletions
diff --git a/officecfg/util/data_val.xsl b/officecfg/util/data_val.xsl
index 0f1ae5c5032e..ddabb4649d29 100644
--- a/officecfg/util/data_val.xsl
+++ b/officecfg/util/data_val.xsl
@@ -3,9 +3,9 @@
*
* $RCSfile: data_val.xsl,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2004-07-05 13:48:15 $
+ * last change: $Author: hr $ $Date: 2004-11-09 11:49:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,8 +77,18 @@
<xsl:param name="xcs"/>
<xsl:param name="schemaRoot">.</xsl:param>
-<xsl:variable name="schemaRootURL"><xsl:value-of select="filehelper:makeAbs($schemaRoot)"/></xsl:variable>
-<xsl:variable name="schemaURL"><xsl:value-of select="filehelper:makeAbs($xcs)"/></xsl:variable>
+<xsl:variable name="schemaRootURL">
+ <xsl:choose>
+ <xsl:when test="function-available('filehelper:makeAbs')"><xsl:value-of select="filehelper:makeAbs($schemaRoot)"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$schemaRoot"/></xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+<xsl:variable name="schemaURL">
+ <xsl:choose>
+ <xsl:when test="function-available('filehelper:makeAbs')"><xsl:value-of select="filehelper:makeAbs($xcs)"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$xcs"/></xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
<!-- ************************************** -->
<!-- * oor:component-data *** -->
@@ -127,7 +137,7 @@
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
- <xsl:message terminate="true">ERROR: The schema element for node <xsl:value-of select="$path"/>
+ <xsl:message terminate="yes">ERROR: The schema element for node <xsl:value-of select="$path"/>
is a <xsl:value-of select="$schema-type"/> and should not have a node-type.
</xsl:message>
</xsl:otherwise>
@@ -282,7 +292,7 @@
<xsl:template name="composeFileURL">
<xsl:param name="componentName"/>
<xsl:variable name="fileURL">
- <xsl:value-of select="$schemaRootURL"/>/<xsl:value-of select="translate($componentName,'.','/')"/>.xcs
+ <xsl:value-of select="$schemaRootURL"/>/<xsl:value-of select="translate($componentName,'.','/')"/><xsl:text>.xcs</xsl:text>
</xsl:variable>
<xsl:value-of select="$fileURL"/>
</xsl:template>