RE: [xsl] i18n and l10n question

Subject: RE: [xsl] i18n and l10n question
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 13 Nov 2006 14:35:40 -0000
> Disregard that: I just had to change version="1.0" to version="2.0"  
> to solve this. Now I get the following error:
> ERROR:  'Namespace prefix 'my' is undeclared.'
> FATAL ERROR:  'Could not compile stylesheet'

As well as changing the version attribute, you'll need to switch to an XSLT
2.0 processor (e.g. Saxon). Otherwise this will be your next error message
after you've fixed the namespace problem.
> How do I solve this? I'm not that familiar with the whole 
> namespace- thing.

It's hard to get very far with XSLT without a basic understanding of
namespaces. You need to do some reading.

In XSLT, the names of user-defined functions are always in a namespace (e.g.
my:sum) to distinguish them from system-defined functions. You can use any
namespace you like, but you must declare it, e.g.
xmlns:my="";. Of course if you're planning to
write a library of reusable functions then you should give the choice of
namespace some thought.

Michael Kay

Current Thread