diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-11-09 10:48:52 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-11-09 10:48:52 +0000 |
commit | a5fa82ff5d0c1abbe009c007757cf63147098c78 (patch) | |
tree | f84ee2f9be50364b844c4d9b515326f0a2cc50c4 /officecfg/util | |
parent | 33f45dc8f257337fddc2625154ded4b88a0ed15f (diff) |
INTEGRATION: CWS nojava1 (1.9.58); FILE MERGED
2004/08/23 11:46:09 jb 1.9.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.9.58.1: #i32143# Correct whitespace handling in composeFileURL, which was broken for xsltproc.
Contributor: Josh Triplett <jtriplett@openoffice.org>
Diffstat (limited to 'officecfg/util')
-rw-r--r-- | officecfg/util/alllang.xsl | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl index 323689609e9c..b1f5c69e872f 100644 --- a/officecfg/util/alllang.xsl +++ b/officecfg/util/alllang.xsl @@ -3,9 +3,9 @@ * * $RCSfile: alllang.xsl,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2004-07-05 13:48:00 $ + * last change: $Author: hr $ $Date: 2004-11-09 11:48:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,7 +60,7 @@ * ************************************************************************ --> -<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oor="http://openoffice.org/2001/registry" @@ -79,8 +79,18 @@ <xsl:param name="schemaRoot">.</xsl:param> <xsl:param name="fallback-locale">en-US</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> <!--************************** TEMPLATES ******************************** --> <!-- ensure that at least root is available --> @@ -174,7 +184,7 @@ </xsl:copy> </xsl:when> <xsl:otherwise> - <xsl:message terminate="true">ERROR: The schema element for a <xsl:value-of select="$schema-type"/> + <xsl:message terminate="yes">ERROR: The schema element for a <xsl:value-of select="$schema-type"/> should not have a node-type. </xsl:message> </xsl:otherwise> @@ -359,7 +369,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> |