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'
How do I solve this? I'm not that familiar with the whole namespace-
thing.
Nico
On 13 Nov 2006, at 14:48, Nico Van Cleemput wrote:
I get the following error:
Compiler warnings:
line 13: Illegal attribute 'as'.
ERROR: 'line 12: Unsupported XSL element 'function'.'
FATAL ERROR: 'Could not compile stylesheet'
Exception in thread "main"
javax.xml.transform.TransformerConfigurationException: Could not
compile stylesheet
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.ne
wTemplates(TransformerFactoryImpl.java:824)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.ne
wTransformer(TransformerFactoryImpl.java:619)
at org.grinvin.help.html.XSLTTest.main(XSLTTest.java:43)
Any idea of a solution or alternative for this?
On 13 Nov 2006, at 13:49, Florent Georges wrote:
Nico Van Cleemput wrote:
Dag,
<tr><td>nr</td><td>description 1description 2</td></tr>
<tr><td>nr</td><td>description 1description 2</td></tr>
key() looks in the whole document. So it returns each time all the
matching elements. Because you just need to access child
elements, you
don't need keys, just use something like:
<xsl:function name="my:i18n-get-properties"
as="element(properties)">
<xsl:param name="i18n" as="element(i18n)"/>
<xsl:sequence select="$i18n/(
node[(_at_)name eq $locale],
node[(_at_)name eq $locale2],
.
)[1]/properties"/>
</xsl:function>
to select the right, more specific locale, then:
<xsl:for-each select="parameter">
<tr>
<td>
<xsl:value-of select="
my:i18n-get-properties(i18n)
/ entry[(_at_)key eq 'parameter.caption']"/>
</td>
<td>
<xsl:value-of select="
my:i18n-get-properties(i18n)
/ entry[(_at_)key eq 'parameter.description']"/>
</td>
</tr>
</xsl:for-each>
Not tested.
Regards,
--drkm
_____________________________________________________________________
______
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos
questions !
Profitez des connaissances, des opinions et des expériences des
internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--