Move XSLT files into a Qt resource

Thiago Macieira thiago at
Tue Dec 24 06:03:32 UTC 2013

On terça-feira, 24 de dezembro de 2013 15:29:58, Miika Turkia wrote:
> This patch broke the XSL transformations that use commonTemplates.xsl for
> commonly used "functions". It seems that the file is found properly and
> functions in there as well. However, for some reason e.g. time conversion
> to seconds (time2sec) returns NaN. This used to work in 4.0 and it works
> when running from commandline with xsltproc.
> I tested to move the time2sec template to uddf-export.xsl (and removing the
> inclusion of commonTemplates) and everything worked correctly. I just
> cannot figure out why this is not working... and I do not really want to
> duplicate code on every xsl file. Any ideas?

When I was writing this patch, the first big problem I ran into was the 
inclusion of commonTemplates.xsl. The parsing simply fails if the file cannot 
be found. So I had to figure out a way to feed that file to XSL.

Now, it could be that I'm feeding it garbage. Can you check what happens if 
you keep the inclusion, but you make the commonTemplates.xsl file an empty one? 
Do you get the behaviour you're describing?

There's also a debug statement commented out in get_stylesheet() that you may 
turn on to get some more info from libxslt.
Thiago Macieira - thiago (AT) - thiago (AT)
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the subsurface mailing list