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 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
John AnnieSubject: Help configuring Xalan-j processor
Author: John Annie
Date: 18 Oct 2007 02:11 PM
Folks,
Can you help me configure the Apache Xalan-j (v2.2.0) XSLT processor to work with my version of Stylus Studio? (Stylus Studio Professional 2007). My client has requested that I use this processor and develop XSLT code using “xsl:stylesheet version="1.0".

I’ve downloaded the xalan-j_2_7_0-bin.zip file from the Apache web site and unzipped five *.jar files to a folder on my “C” drive (“C:\Program Files\xalan-j_2_7_0”). The five files are:
serializer.jar
xalan.jar
xercesImpl.jar
xml-apis.jar
xsltc.jar


I believe I need to define a “Custom” processor. <Tools|Options|XSLT Editor|Processor Settings> But am unsure how to configure this information in Stylus Studio, specifically the information relating to “Command Line”, “Path”, and “Crosspath”. Can you provide guidance in setting these values?

I have Java JRE version 1.6.0_03 and JDK version 1.6.0_03 installed on my PC. Attached is a screen shot of the Options Java Virtual Machine window.


A second question is whether I need to do anything special to use the Xalan processor (such as declare any special namespace in my *.XSL document, etc.).

Thanks!

John Annie


ImageSSJVMsettings.jpg
JVM screen shot

Postnext
Alberto MassariSubject: Help configuring Xalan-j processor
Author: Alberto Massari
Date: 22 Oct 2007 06:14 AM
Hi John,
if you need to use a specific custom processor for several XSLT stylesheet, you can specify its parameters in the Tools | Options -> Module Settings -> XSLT Editor -> Processor Settings dialog.
In order to use Xalan-J 2.7 (you stated v. 2.2, but then referred to v. 2.7 JARs, so I am guessing you mistyped the first number; if not, you will have to change the list of JARs accordingly) you should select the "custom" processor from the combo box, check the "Use as default processor" check box and then enter:

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:\Program Files\xalan-j_2_7_0\xalan.jar;C:\Program Files\xalan-j_2_7_0\serializer.jar;C:\Program Files\xalan-j_2_7_0\xml-apis.jar;C:\Program Files\xalan-j_2_7_0\xercesImpl.jar

Now, every time you create a new stylesheet, it will inherit these settings; if you have existing stylesheets that need to use Xalan-J, you will have to manually update them by invoking the scenario dialog (by pressing the "..." button next to the scenario name in the XSLT toolbar), selecting the Processor tab, selecting the 'custom' processor and inserting the same information as above.

Hope this helps,
Alberto

Postnext
John AnnieSubject: Help configuring Xalan-j processor
Author: John Annie
Date: 22 Oct 2007 08:13 AM
Thanks Alberto, that's what I needed!

John

Postnext
John AnnieSubject: Help configuring Xalan-j processor
Author: John Annie
Date: 31 Oct 2007 12:16 PM
Folks,

I'm not out of the woods yet...

I still need help me with my Apache Xalan-j (v2.7.0) XSLT processor configuration? Per Alberto’s suggestions, I have configured a custom processor with the settings from this earlier thread (see above). In the Options | General | Java Virtual Machine dialog, the JRE version is set to 1.6.0_02 and the JDK version to 1.6.0_03 (these are after I click on the “auto detect” button. I’ve attached a screen shot for clarity.

My problem is when I try to run my xsl translator I encounter the following error message in the output window:

External XSLT processing started...
java.lang.NoClassDefFoundError: org/apache/xalan/xslt/Process
Exception in thread "main" ...done

Can someone help in troubleshooting this problem?

Thanks!
John Annie


UnknownSSJVMsettings_10_31_07.jpg
JVM settings

Postnext
Alberto MassariSubject: Help configuring Xalan-j processor
Author: Alberto Massari
Date: 31 Oct 2007 01:25 PM
Hi John,
could you attach a screenshot of the scenario dialog of the XSLT document, with the Processor tab active?

Thanks,
Alberto

Postnext
John AnnieSubject: Help configuring Xalan-j processor
Author: John Annie
Date: 31 Oct 2007 01:37 PM
Alberto,

Here’s the screen shot. Since Command Line and Crosspath entries are unreadable because of their length, I copied and pasted these values (from the dialog window) in this reply.

Command Line:
java org.apache.xalan.xslt.Process -IN %1 -XSL %2 -OUT %3

Classpath: C:\Program Files\xalan-j_2_7_0\xalan.jar;C:\Program Files\xalan-j_2_7_0\serializer.jar;C:\Program Files\xalan-j_2_7_0\xml-apis.jar;C:\Program Files\xalan-j_2_7_0\xercesImpl.jar

Thanks for the help,
John


Imagescenariodialog.jpg
scenario dialog

Postnext
Alberto MassariSubject: Help configuring Xalan-j processor
Author: Alberto Massari
Date: 31 Oct 2007 01:43 PM
Hi John,
I see from the screenshot that the classpath setting has a "Classpath: " at the beginning; unless this has been caused by the cut&paste operation, the content of that setting should be just a sequence of JARs separated by semicolons.

Hope this helps,
Alberto

Posttop
John AnnieSubject: Help configuring Xalan-j processor
Author: John Annie
Date: 31 Oct 2007 01:53 PM
Alberto,

That fixed it. Thanks!!

John

 
Topic Page 1 2 3 4 5 6 7 8 9 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.