Subject:Stylus Studio Converters command-line utility Author:Ivan Pedruzzi Date:22 Nov 2006 12:58 PM Originally Posted: 19 Oct 2006 07:25 PM
This is a simple utility to invoke the Stylus Studio Converters through a command line interface to process a set of documents.
The command line takes four parameters:
1) The Stylus Studio Installation ID, see Help -> About in the Stylus Studio IDE
2) The conversion direction: toxml or fromxml
3) The Converter URL
4) A file mask like *.csv
Instructions:
- Copy the attached convert.jar into <Stylus Studio folder>\bin
- Set environment variable CONVERTERJAR to the jar location for instance
SET CONVERTERJAR= "c:\Program Files\Stylus Studio 2007 XML Enterprise Suite\bin\convert.jar"
To execute a conversion type the following
java -jar %CONVERTERJAR% 12345-6789012345 fromxml adapter:CSV:sep=,:first=yes *.xml
Happy conversions
Ivan Pedruzzi
Stylus Studio Team
Here is the current problem i now face with v2007 release 2
C:\Program Files\Stylus Studio 2007 XML Enterprise Suite Release 2\bin>Convert.j
ar;XMLConverters.jar Convert 12345-6789012345 toxml adapter:CSV:sep;,:first=ye
s "D:\data\KB\Kanisa\KMap\stylesheets\Evidences\convertevidence.conv" *.csv
C:\Program Files\Stylus Studio 2007 XML Enterprise Suite Release 2\bin>java -cp
Convert.jar;XMLConverters.jar Convert 12345-6789012345 toxml adapter:CSV:sep;,
:first=yes "D:\data\KB\Kanisa\KMap\stylesheets\Evidences\convertevidence.conv"
*.csv
Exception in thread "main" com.stylusstudio.converter.ConverterException: The ev
aluation period for the Built-in or Custom XML Converter product has expired.
at com.stylusstudio.converter.ConverterFactory.newConvertToXML(Converter
Factory.java:46)
at Convert.main(Convert.java:32)
Caused by: com.ddtek.xmlconverter.exception.ConverterException: The evaluation p
eriod for the Built-in or Custom XML Converter product has expired.
at com.ddtek.xmlconverter.exception.ConverterException.WrapAsConverterEx
ception(ConverterException.java:43)
at com.ddtek.xmlconverter.ConverterFactory.newConvertToXML(ConverterFact
ory.java:83)
at com.stylusstudio.converter.ConverterFactory.newConvertToXML(Converter
Factory.java:44)
... 1 more
1. Please don't include your real activation codes in public posts.
We adjusted your message to remove them.
2. You either use the CSV converter or the .conv file for the Custom XML
Converter, not both at once. So the syntax would be either
java -cp Convert.jar;XMLConverters.jar Convert 12345-6789012345 toxml converter:CSV:sep=,:first=yes xyz.csv
or
java -cp Convert.jar;XMLConverters.jar Convert 12345-6789012345 toxml converter:file:///D:/data/KB/Kanisa/KMap/stylesheets/Evidences/convertevidence.conv xyz.csv
2a. Starting in 2007 Release 2, the adapter: scheme has been renamed to
converter:, although adapter: still works for the moment.
2b. It's safer to use URI syntax than filename syntax when dealing with web
technologies. So for filenames, use file:/// and forward slashes.
2c. You had "sep;," instead of "sep=,"
3. Wildcards aren't supported. Instead, use the CMD 'for' syntax, like this:
for %i in (*.csv) do java -cp .....
4. In order to run the converters from outside of Stylus Studio, you need a
valid converter license. You may be granted an evaluation of them, but they
are different product from Stylus Studio when used externally, and are
separately licensed. Contact stylusstudio@stylusstudio.com for details.
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:25 Feb 2009 10:44 PM
This could be a life saver for me so first I thank you for opening this up. I do have a few questions. The following step:
- Set environment variable CONVERTERJAR to the jar location for instance
SET CONVERTERJAR= "c:\Program Files\Stylus Studio 2007 XML Enterprise Suite\bin\convert.jar"
Where do I find this environment variable?
Also, is it true that this will not work with a trial key?
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:26 Feb 2009 03:32 PM
Sorry for my ignorance... I just want to make sure I get this right as I have not gotten it to work quite yet. After I place the jar file into the directory, I need to enter this into the command line?
SET CONVERTERJAR= "c:\Program Files\Stylus Studio 2009 XML Enterprise Suite\bin\convert.jar"
When I did this, I get no response while in the command window.
I understand that once everything is setup, I would enter the following into the command line. 12345-6789012345 is replaced with my tial key which looks something like this XXXXX-XXXXX-XXXXX-XXXXX.
Exception in thread "main" java.lang.NoClassDefFoundError: Convert Caused by: java.lang.ClassNotFoundException: Convert
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
.... let me know if you need the rest transcribed into this email. I am hoping there is something trivial that I missed from above.
So you know what I am trying to accomplish... I am just trying to automate converting a CSV to XML without having to open the stylus studio application.
I assume that if this works, I will see my XML file in the same directory as the CSV?
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:26 Feb 2009 03:51 PM
Sorry for my ignorance... I just want to make sure I get this right as I have not gotten it to work quite yet. After I place the jar file into the directory, I need to enter this into the command line?
SET CONVERTERJAR= "c:\Program Files\Stylus Studio 2009 XML Enterprise Suite\bin\convert.jar"
When I did this, I get no response while in the command window.
I understand that once everything is setup, I would enter the following into the command line. 12345-6789012345 is replaced with my tial key which looks something like this XXXXX-XXXXX-XXXXX-XXXXX.
Exception in thread "main" java.lang.NoClassDefFoundError: Convert Caused by: java.lang.ClassNotFoundException: Convert
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
.... let me know if you need the rest transcribed into this email. I am hoping there is something trivial that I missed from above.
So you know what I am trying to accomplish... I am just trying to automate converting a CSV to XML without having to open the stylus studio application.
I assume that if this works, I will see my XML file in the same directory as the CSV?
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:27 Feb 2009 12:30 AM
Unfortunately, I am in a tight deadline but I absolutely want to use this tool. Is there a paid resource out there that could help us get this up and running remotely?
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:27 Feb 2009 12:38 AM
Unfortunately, I am in a tight deadline but I absolutely want to use this tool. Is there a paid resource out there that could help us get this up and running remotely?
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:01 Mar 2009 07:35 PM
Anyone out there whom we can procure some hours to help us out? Is what we are trying to do viable with this application? Automate converting a CSV to XML.
I have a .conv file that I have setup and all I want to do is automate the conversion using the command line. I have to have an answer for monday, or we have to keep searching.
Subject:Stylus Studio Converters command-line utility Author:Ryan Goodman Date:01 Mar 2009 09:10 PM
Anyone out there whom we can procure some hours to help us out? Is what we are trying to do viable with this application? Automate converting a CSV to XML.
I have a .conv file that I have setup and all I want to do is automate the conversion using the command line. I have to have an answer for monday, or we have to keep searching.