Subject:Stylus vs Altova Mapforce - Stylus steps to acheive similar result? Author:steve reid Date:14 Sep 2006 06:02 AM
Hi all,
Im deciding which xml prog to buy and I'm now testing Stylus Studio and need some help in the steps I should be taking.
I have a csv file. It needs to be converted to xml then be validated against a pre-designed schema file.
In Altova mapforce I imported the schema file, imported the csv file and mapped or connected the two files together with lines, and the output looked good.
How do I do this in Stylus? Im not looking for detail just a quick - you need to do A, then B then C and you have your xml file.
Subject:Stylus vs Altova Mapforce - Stylus steps to acheive similar result? Author:Minollo I. Date:14 Sep 2006 01:22 PM
In Stylus Studio v2006 you can achieve the CSV->XML->XSLT steps simply creating a new XSLT and opening the XML source for the XSLT through a conversion (File > Open, select the CSV file and check the "Convert to XML box"). The validation step is not automatically available in this sequence.
In the coming Stylus Studio v2007, you can create an XML Pipeline and have a CSV conversion node connected to a Validate node, that in turn feeds an XSLT transformation node (or an error node if validation fails). The whole pipeline process can then been generated as Java code.
Subject:Stylus vs Altova Mapforce - Stylus steps to acheive similar result? Author:steve reid Date:15 Sep 2006 10:07 AM
Thanks for the info! Im almost there having done as you said above, but Im having trouble with the mapping section and wondered if someone can help. Im a newb so it should be pretty simple!
My CSV and resulting XML doc is laid out like this, with the first line being the header:
OFFICE OFFICE_CODE NAME AGE
A 123 john 28
A 123 james 36
A 123 jim 54
I need the xml mapper to map to an xml document like this:
but im not having much luck! I cant seem to get the xml file to "split" correctly. Should I be arranging the csv to a more appropriate format at the csv to xml coversion stage or should I be trying to arrange in my desired order using the xslt mapper? Been trying for hours now with no luck!
Any help appreciated
Steve
Subject:Stylus vs Altova Mapforce - Stylus steps to acheive similar result? Author:Tony Lavinio Date:19 Sep 2006 03:51 PM
The best way to do it would be a two-stage approach.
The first step uses Convert-to-XML to create the
'XML equivalent' of the original file.
Then you use XSLT to rearrange and group.
Some pointers on grouping can be found at the excellent pages
under the "Complex Tasks" heading at http://www.jenitennison.com/xslt/index.html
Especially look at the Grouping pages.