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 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
steve reidSubject: 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.

Thanks
Steven

Postnext
Minollo I.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.

Postnext
steve reidSubject: 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:

<headingset>
<office>A</office>
<office_code>123</office>
<heading>
<name>john</name>
<age>28</age>
</heading>
<heading>
<name>james</name>
<age>36</age>
</heading>
<heading>
<name>jim</name>
<age>54</age>
</headingset>

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

Posttop
Tony LavinioSubject: 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.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.