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)
-> + XPath documentation confusion (2)
-> + Extra block/CR generated (6)
-> + Apache FOP (2)
-> + Inserting Java Script (2)
-> + Convert EDIFACT to X12 or vice... (6)
-> + XSD: Restricting an attribute ... (2)
-> + Creating dynamically named ele... (2)
-> + Report reverts back to XHTML-C... (2)
-> + Certificate error (7)
-> + Opening DITA files and associa... (4)
-> + Cannot see links from source d... (10)
-> + SS 2007 vs. SS 2008 calling a ... (3)
-> + Unable to compile java file (8)
-> + Unable to use xsi:type attribu... (2)
-> + Unable to save xslt file after... (5)
-> + .NET XslTransform Compiled out... (3)
-> + Reporting Comparison (2)
-> + problems setting up the fonts ... (3)
-> + XML conversion (5)
-> + XQUERY: Application Crash (3)
-- Previous [1321-1340] [1341-1360] [1361-1380] 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.