XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
david douSubject: Error when running xalan samples extensions in Stylus Studio Enterprise Edition
Author: david dou
Date: 13 Nov 2007 12:00 AM
Hi There,

When running xalan samples extensions in Stylus Studio Enterprise Edition. Release 2.

1. Set up the processor as Java built-in.
2. Add the D:\XSLT\Test\Extensions\IntDate.jar to the project classpath.


I got the below error message. Could you please tell me how can I fix this issue?

Recoverable error: Cannot find class 'IntDate'.
Recoverable error: Cannot find external method 'IntDate.getDate' (must be public).
Recoverable error: Cannot convert argument/return type in call to method 'java.text.SimpleDateFormat.format(void)'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
at com.exln.stylus.CJaxpDriver.transform(CJaxpDriver.java:96)
at com.exln.stylus.CJaxpDriver.doProcessing(CJaxpDriver.java:141)
at com.exln.stylus.CProcessorDriver.process(CProcessorDriver.java:111)
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
at com.exln.stylus.CJaxpDriver.transform(CJaxpDriver.java:96)
at com.exln.stylus.CJaxpDriver.doProcessing(CJaxpDriver.java:141)
at com.exln.stylus.CProcessorDriver.process(CProcessorDriver.java:111)
Could not compile stylesheet



<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xalan/java"
version="1.0">

<xsl:template match="/">
<xsl:apply-templates select="/doc/date"/>
</xsl:template>

<xsl:template match="date">
<xsl:variable name="year" select="string(@year)"/>
<xsl:variable name="month" select="string(@month)"/>
<xsl:variable name="day" select="string(@day)"/>
<xsl:variable name="format" select="string(@format)"/>
<xsl:variable name="formatter"
select="java:java.text.SimpleDateFormat.new($format)"/>
<xsl:variable name="date"
select="java:IntDate.getDate($year,$month,$day)"/>
<p>Date: <xsl:value-of select="java:format($formatter, $date)"/></p>
</xsl:template>

</xsl:stylesheet>

Postnext
Alberto MassariSubject: Error when running xalan samples extensions in Stylus Studio Enterprise Edition
Author: Alberto Massari
Date: 14 Nov 2007 04:36 AM
Hi David,
the interface between Stylus and the Java built-in processor doesn't allow the processor to access external functions; you should create a custom processor by specifying, for example:

Command Line: java org.apache.xalan.xslt.Process -IN %1 -XSL %2 -OUT %3
Path: C:\Program Files\Java\jre1.6.0_03\bin
Classpath: C:\xalan-j_2_7_0\xalan.jar;C:\xalan-j_2_7_0\serializer.jar;C:\xalan-j_2_7_0\xml-apis.jar;C:\xalan-j_2_7_0\xercesImpl.jar;C:\yourJavaExtensionFolder

Hope this helps,
Alberto

Posttop
peter douSubject: Error when running xalan samples extensions in Stylus Studio Enterprise Edition
Author: peter dou
Date: 14 Nov 2007 03:55 PM
Hi Alberto,

It works now.

Thanks,

David

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.