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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + Conerting Excel to XML (5)
-> + count the number of 1 appearin... (10)
-> + Import validation errors (2)
-> + Custom Validation Saxon (4)
-> + How Can i Check if else condit... (2)
-> + Stylus Studio 2009 Ent still b... (2)
-> + cannot download SS2009 (2)
-> + Use of import-schema wants sch... (4)
-> + Replacement Install Media/Bits (3)
-> + XML to Flat File (5)
-> + Select one of multiple attribu... (13)
-> + Web Service - SOAP Error (3)
-> + I find a BUG in stylus studio ... (8)
-> + Text to XML conversion issue (2)
-> + Fixed width flat files (3)
-> + Stylus Studio Crashes when val... (3)
-> + XSL Changes doesn't reflect in... (2)
-> + Custom Conversion Definition T... (6)
-> + Support for UK EDI Tradacoms ... (2)
-> + How to find and remove all ins... (2)
-> + XML to cobol Sequential file (2)
-> + Pipe delimited flat file conve... (2)
-> + Cannot Function Block > DataDi... (3)
-> + License Authentication failed (2)
-> + Flat File Conversion (3)
-> + Struzzo.exe sing 50% of CPU (2)
-> + Saxon9 Transformation error ha... (2)
-> + com.ddtek.xquery3.XQQueryExcep... (10)
-> + XML attribute name (2)
-> + JAVA and XML (2)
-> + DB Connection Error (3)
-> + Dicstionaty Librarys for other... (2)
-> + Passing parameters (3)
-> + Xmlconverter does not work (2)
-> + non-printing characters in Fil... (3)
-> + Including row nos while conve... (5)
-> + Getting Evaluation Copy except... (2)
-> + SS 2008 R2 Bug? (4)
-> + Java Heap Space (2)
-> + generate report from .xsl file... (3)
-> + Can't encode 0x4 in text (3)
-> + Recognize Japanese Characters (2)
-> + converting .xsl to xml using c... (2)
-> - Uninstall doesn't clean up reg... (1)
-> + CDISC (5)
-> - creating database from XML sch... (1)
-> + error: side-by-side configurat... (3)
-> - How to convert pdf into rdf fo... (1)
-> + Apache FOP (5)
-> + XPath Query Editor 'Buggy' (3)
-> - Feature request (1)
-> + XML Convertors (2)
-> + XMLConverters version 3.2.0.0 ... (2)
-> + JVM/stylus studio abort on sav... (3)
-> + using oasis catalog in pipelin... (6)
-> + Another whitespace issue with ... (2)
-> + saxon 9.1.0.2 (2)
-> + xslt change namespace (4)
-> - xslt change namespace (1)
-> + HL7 Conversion (3)
-> + mixed content mapping (2)
-> + HL7 to XML to HL7 (5)
-> + newest version of Saxon SA? (3)
-> + ORM / ORU Seqments (7)
-> + XSLT is causing Java.lang OutO... (3)
-> + Create POJOs from EDI (4)
-> - Embedded message (1)
-> + How to create Documentation fo... (2)
-> + xslt transformation (2)
-> - remove BOM (1)
-> + Changing data as it goes into... (5)
-> + How to (graphically) map one X... (2)
-> + Stylus Studio 2008 Release 2 -... (2)
-> + keyboard shortcuts to switch b... (2)
-> - Help with getting Output XML f... (8)
-> ->Help with getting Output ...
-> ->Help with getting Output ...
-> ->Help with getting Output ...
-> ->Help with getting Output ...
-> ->Help with getting Output ...
-> ->Help with getting Output ...
-> ->Help with getting Output ...
-> + Document created from schema (2)
-> + XSD Validation error (2)
-> + Set the value of an attribute ... (2)
-> + Saving as XML, Source Data Typ... (2)
-> + Own templates in file/new (4)
-> + Does Stylus Studio support the... (2)
-> - How to transform XML file to T... (1)
-> + Extract XML file from a HTML s... (2)
-> + Crashing, high cpu usage, larg... (6)
-> + Creating an xml document based... (2)
-> + Problem with restriction (2)
-> + EDI Invalid date time error (2)
-> + How to Compose a Web Service C... (5)
-> + Java Complie errors with XML C... (2)
-> + Creating xml file from CSV uss... (4)
-> + XML Converters (6)
-> + schema validation (15)
-> - 9/30 Customer Showcase Webinar... (1)
-> + ETL (2)
-> + xsd:sequence question (3)
-> + contains an invalid path (5)
-> - Custom converter to map flat f... (1)
-> + validating a 4.01 transitional... (2)
-> + Cannot Use Stylus Studio On Mu... (5)
-> + Missing DB to XML option (2)
-- Previous [901-920] [921-940] [941-960] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Daniel LuczakSubject: Help with getting Output XML file
Author: Daniel Luczak
Date: 29 Sep 2008 05:15 PM
Hello all,
I am new to Stylus--
Here is my question using Stylus Studio 2008
I have done the following
File|New|XSLT
For the input file,
choose your CSV file, and tell it to use the XML Converter
select the CSV converter
Switch to the mapping tab
On the right, load your XSD

After I do the mapping how do I save the CSV file into an XML file with only the mapped fields that I mapped from the XSD file.

My Source document is the .csv file and my target document is the XSD file-- How do I get the XML file


Thanks

Dan

Postnext
Minollo I.Subject: Help with getting Output XML file
Author: Minollo I.
Date: 30 Sep 2008 09:04 AM
The result of defining the mapping is an XSLT (in your case; or an XQuery if you create an XQuery instead); yo get the XML result of your mapping, you need to execute the XSLT (menu XSLT > Preview Result...).

That will generate the result in the Preview window; you can save the XML from there (there is a Save button at the left of the Preview window), or you can also instruct the XSLT to save the result to a specific URI every time the XSLT is executed (XSLT > Scenario Properties... > Output URL

Postnext
Daniel LuczakSubject: Help with getting Output XML file
Author: Daniel Luczak
Date: 30 Sep 2008 09:32 AM
I tried your suggestion but I get an xml file with no data
I am attaching the 3 files that I am using
.csv is the original data file which needs to be converted to XML but mapped to fields in the .xsd file
.xsd is the mapping file
.xsl file is the mapping file from stylus Studio.

Maybe I am doing this in the worng steps
I thought I could go from .csv to .xml using the mapping function


UnknownSalesforceaccounttestdata.csv


UnknownProject1.prj


UnknownSaletosellignet01.xsl


UnknownSelligentSchema.xsd

Postnext
Minollo I.Subject: Help with getting Output XML file
Author: Minollo I.
Date: 30 Sep 2008 09:45 AM
I see only one problem: the output URL shouldn't go through a conversion step, but it should just be a URL like "c:\test.xml"

What I get is this:
<?xml version="1.0"?>
<Selligent>
<Cpy NRID="">
<CpyTxtOpnFld22/>
<CpyTxtOpnFld74/>
<CpyTxtOpnFld78/>
<CpyTxtOpnFld79/>
<CpyTxtOpnFld80/>
<CpyTxtOpnFld81/>
<CpyType/>
</Cpy>
</Selligent>

...no data, but it looks like that data you are mapping is missing from the original CSV you posted, so I guess that's expected.

Postnext
Daniel LuczakSubject: Help with getting Output XML file
Author: Daniel Luczak
Date: 30 Sep 2008 10:04 AM
There is not much data that matches in the CSV and XSD but 2 records match the map where there is information in the cpytype (xsd file) and Primary_activity__c (csv file)-- I should get two records in the XML file

Postnext
Minollo I.Subject: Help with getting Output XML file
Author: Minollo I.
Date: 30 Sep 2008 10:13 AM
I see what you mean; the problem is that your mapping is not iterating through all the records in the source CSV file; you can do that easily, even if I'm not sure which corresponding elements in the XML Schema should be created for each record in the CSV file (I don't see elements marked with multiple occurrence in the XSD).

Anyway, click the right button of the mouse on "row" on the left, drag a line on top of "Cpy" on the right and drop it there; choose "Create repeatable link" and at that point you'll get on "Cpy" element in the output for each "row" in the input, and you'll see some data.

Postnext
Daniel LuczakSubject: Help with getting Output XML file
Author: Daniel Luczak
Date: 30 Sep 2008 11:57 AM
Thanks-
It is now working correctly--
One more question
Can I run this conversion from the command line and if yes is there documentation for this or do I need to do this in Java or C #. If it needs to be done in Java or C # do you have a link to sample code

Posttop
Minollo I.Subject: Help with getting Output XML file
Author: Minollo I.
Date: 30 Sep 2008 01:21 PM
You can do that from the command line using the built-in XSLT processor (StylusXslt.exe); or you can do that from the command line using Saxon (see saxonica dot com). You can also do that in Java or C# (XSLT > Generate Code).

As you are using XML Converters to do CSV to XML, you will need to get the proper XML Converters runtime license to be able to run the conversion through command line or API; the version bundled with Stylus can be used only from within the Stylus Studio UI and as a 14 days evaluation from command line/API. See www.xmlconveters.com/buy for details about how to contact DataDirect sales.

   
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.