XSLT on external function with SAXON PE-9.5
Oxygen general issues.
-
- Posts: 1
- Joined: Sat Nov 09, 2013 2:09 am
XSLT on external function with SAXON PE-9.5
Hi,
Oxygen 15.3 with student license on MacOS Lion.
I'm experimenting with xslt with external functions, I followed the documentation on reflexive functions and I create a very simple class:
I packaged it in a .jar, that was verified by using it in another class, and created a simple .xslt to call it:
I created a transformation scenario with Saxon PE 9.5.1.2 as engine and added my jar as an extension, however, the editor gives me the error:
When I run the transformation, same error. I tried adding a validation scenario, but still, the same error. Calling standard java functions work. I also verified that extensions are activated in the preferences.
Any hint?
Best Regards,
Luis
Oxygen 15.3 with student license on MacOS Lion.
I'm experimenting with xslt with external functions, I followed the documentation on reflexive functions and I create a very simple class:
Code: Select all
package prueba;
public class Saludo {
public static String hola(){
return "Hola";
}
}
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output indent="yes" method="xml" />
<xsl:template match="data/element">
<elemento>
<prueba>
<xsl:value-of select="saludo:hola()" xmlns:saludo="java:prueba.Saludo" />
</prueba>
</elemento>
</xsl:template>
Code: Select all
XPST0017 XPath syntax error at char 0 on line 27 in {saludo:hola()}: Cannot find a matching 0-argument function named {java:prueba.Saludo}hola(). For diagnostics on calls to Java methods, use the -TJ command line option or set the Configuration property FeatureKeys.TRACE_EXTERNAL_FUNCTIONS
Any hint?
Best Regards,
Luis
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: XSLT on external function with SAXON PE-9.5
Hi,
I'm guessing you're using Oxygen v15.1 (bundles Saxon-PE 9.5.1.2).
I don't see any problems in the setup you described here. Considering that standard functions work, there may a problem with the way you have configured the extension or the extension itself (.class or .jar).
Make sure the JAR is correctly packed (preserve the package folder hierarchy). In the Extensions configuration add the jar itself (or the compiled classes root folder).
Regards,
Adrian
I'm guessing you're using Oxygen v15.1 (bundles Saxon-PE 9.5.1.2).
I don't see any problems in the setup you described here. Considering that standard functions work, there may a problem with the way you have configured the extension or the extension itself (.class or .jar).
Make sure the JAR is correctly packed (preserve the package folder hierarchy). In the Extensions configuration add the jar itself (or the compiled classes root folder).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service