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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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
(Deleted User) Subject: Error when running xalan samples extensions in Stylus Studio Enterprise Edition
Author: (Deleted User)
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

   
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.