Quick Start |
Getting up to speed quick |
Download
So, you want to start using Rosetta right away? OK, here's a way to do it if you're running Windows.
First download all the following:
- a copy of the Rosetta DTD from http://RosettaST.sourceforge.net/DTD/Rosetta.dtd.
- the exporter and XSL stylesheets that you need from the files page.
- an XSLT processor (best for you would be Xalan-C if you're not converting to ObjectStudio or S#) from the XSLT page.
- the batch files we ourselves use for transforming.
Install
- Create a directory on your hard drive, for example c:\Rosetta.
- Add c:\Rosetta to your PATH environment variable.
- Create a subdirectory named c:\Rosetta\DTD, and copy the DTD there.
- Create a subdirectory named c:\Rosetta\XSL, and copy the the XSL stylesheets there.
- Create a subdirectory named c:\Rosetta\Xalan, and copy the the Xalan files there.
- Copy the batch files into c:\Rosetta.
- Open setXSLTCmd.bat in an editor, and set the following values.
set XSLTCMD=c:\Rosetta\Xalan\xalan.exe
set XSLDIR=c:\Rosetta\XSL
Export and Convert
Install the exporter into your image, and execute the following code:PackageFacade dtdUrl: 'file:///c:/Rosetta/DTD/Rosetta.dtd'.
This way, you have a local copy of the DTD, and the transformation runs quicker.
If you want, and you have SUnit installed (you *do* have SUnit, don't you?), run the test cases.
Do a trial export to an in-memory stream, using something like the following code (corrected for your dialect):
| pkg stream | pkg := PackageManager current packageNamed: 'RosettaPreLoadTests'. stream := WriteStream on: '' copy. [pkg facade writeRosettaXmlOn: stream] ensure: [stream close]. stream contents inspect
Export your code. Use the code snippet above as a start, and write to a FileStream. Some exporters already have menu items for Rosetta export.
Now, from the command line, you can use any of the batch files to transform an XML file into another dialect. Just call e.g.
ros2VW MyXMLFile // note - no .XML extension!