Subject: Re: Failed to build misc/openoffice (problems with officecfg/scheme)
To: Greg Oster <oster@cs.usask.ca>
From: Michael Rauch <mrauch@NetBSD.org>
List: tech-pkg
Date: 09/28/2005 13:51:58
--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi, 

On Tue, Sep 13, 2005 at 02:32:56PM -0600, Greg Oster wrote:
> Michael Rauch writes:
> > On Tue, Sep 13, 2005 at 12:37:07PM +0700, Ian Zagorskih wrote:
> > > [...]
> > > /usr/pkg/bin/xsltproc 
> > > -o ../../unxbsdi2.pro/misc/registry/res/de/org/openoffice/Inet.properties \
> > > 	            --stringparam locale de \
> > > 	            ../../util/resource.xsl org/openoffice/Inet.xcs
> > > XPath error : Undefined variable
> > > compilation error: file ../../util/resource.xsl line 87 element template
> > > Failed to compile predicate
> > > [...]
> 
> FWIW, I just saw this same error on a Sept 12 NetBSD/i386 3.0_BETA build, 
> with freshly-rebuilt pkgsrc bits from Sept 12 too.
> 
> The xlst bits in use are:
> 
> libxslt-1.1.15      XSLT parser library from the GNOME project

got further on this problem. Is is indeed caused by the libxslt update.
Some mails on the gnome mailing lists with the same error message seem
to indicate that OOo uses code which is wrong but was silently accepted
in earlier versions, and now correctly doesn't compile  
(Variables are not allowed in xsl match strings).
I couldn't find any reference to that bug on the OOo mailing lists so
far, which is not too surprising as the standard builds are done with
java and the Debian people, who do use xsltproc, probably still have the
older version.

For the moment I have a small hack (attached) which:
*) is definitely wrong 
*) lets the build finish successfully 
*) as far as I could test only leaves out some definitions/help texts.

I'll try to raise the question on the appropriate OOo mailing list.
If somebody is familiar with xsl and could help, this would also be more
than welcome.


Cheers

Michael


--Nq2Wo0NMKNjxTN9z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ba

$NetBSD$

--- ../officecfg/util/resource.xsl.orig	2005-09-18 17:46:56.000000000 +0200
+++ ../officecfg/util/resource.xsl
@@ -84,7 +84,7 @@
     </xsl:template>
 
     <!-- match all elements that could possibly contain info elements -->
-    <xsl:template match="info/desc[@xml:lang=$locale]|info/label[@xml:lang=$locale]">
+    <xsl:template match="info/desc[@xml:lang=locale]|info/label[@xml:lang=locale]">
 
         <!-- print TPF's path to current node -->
         <xsl:for-each select="ancestor-or-self::*">

--Nq2Wo0NMKNjxTN9z--