[XPATH] fonction starts-with(): Erreur de syntaxe
Bonjour à tous,
J'utilise la fonction starts-with de xpath pour faire un test sur une chaine de caractères (titre), mais j'ai une erreur de syntaxe que je n'arrive pas à voir.
Voilà mon code xsl:
Code:
1 2
|
<xsl:when test="starts-with(titre,'Le') or starts-with(titre,'La') or starts-with(titre,'Les') or starts-with(titre,'L'') or starts-with(titre,'Un') or starts-with(titre,'Une')"> |
Voilà l'erreur affichée dans la console de mon eclipse :
Code:
1 2 3 4 5 6 7
|
ERROR: 'Erreur de syntaxe dans 'starts-with(titre,'Le') or starts-with(titre,'La') or starts-with(titre,'Les') or starts-with(titre,'L'') or starts-with(titre,'Un') or starts-with(titre,'Une')'.'
FATAL ERROR: 'Erreur de syntaxe dans 'starts-with(titre,'Le') or starts-with(titre,'La') or starts-with(titre,'Les') or starts-with(titre,'L'') or starts-with(titre,'Un') or starts-with(titre,'Une')'.'
Exception in thread "main" javax.xml.transform.TransformerConfigurationException: Erreur de syntaxe dans 'starts-with(titre,'Le') or starts-with(titre,'La') or starts-with(titre,'Les') or starts-with(titre,'L'') or starts-with(titre,'Un') or starts-with(titre,'Une')'.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:1020)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:791)
at CED_pkg.Main.main(Main.java:37) |
Des idées ?