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
Bill StandkeSubject: XML to CSV Video create csv template by dragging?
Author: Bill Standke
Date: 13 Dec 2012 06:40 PM
Originally Posted: 13 Dec 2012 02:27 PM
In the xml to csv video; the csv template is created by dragging a portion of xml over the template.csv file. When I try to do this I always get the not available circle with a slash through it. What is the secret to making this work?

Having trouble creating csv using the mapper (xquery) in general
1) when I add a csv target it only creates a table entry no row entry
2) running the query outputs a bunch of text not necessarily a csv

Can anyone provide a step by step with the current version?

Thanks

Postnext
Ivan PedruzziSubject: XML to CSV Video create csv template by dragging?
Author: Ivan Pedruzzi
Date: 14 Dec 2012 01:06 AM
Originally Posted: 14 Dec 2012 01:05 AM

I was able to replicate this entire tutorial with version X15
http://www.stylusstudio.com/videos/xml_to_csv/xmltocsv.swf

Are you dragging from the source panel on the left to the target panel on the right?

1) Does your CSV template have 1 row header and some rows of data like the following?

id, title
aa,aa
aa,aa
aa,aa


2) Have you set the the serialize option as described in the video?
declare option ddtek:serialize "method=CSV:first=yes";


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Bill StandkeSubject: XML to CSV Video create csv template by dragging?
Author: Bill Standke
Date: 15 Dec 2012 11:23 AM
Originally Posted: 15 Dec 2012 11:01 AM
ok kind of got it working. My output does not include comma column seperators or crlf for each row?

declare option ddtek:serialize "method=CSV:first=yes";
<table>
{
for $BusinessCatalog in /UDML/BusinessCatalog ,
$LogicalTableIDList in $BusinessCatalog/LogicalTableIDList
return
<row>
<catalogid>
{
/UDML/BusinessCatalog/BusinessCatalogID/text()
}
</catalogid>
<catalogname>
{
/UDML/BusinessCatalog/BusinessCatalogName/text()
}
</catalogname>
<logicaltableid>
{
/UDML/BusinessCatalog/LogicalTableIDList/LogicalTableID/text()
}
</logicaltableid>
</row>
}
</table>


After looking at the video I'm still not clear how you create the template structure by dragging a highlighted portion of the xml??

I created the template manually just fine.

Thanks

Postnext
Bill StandkeSubject: XML to CSV Video create csv template by dragging?
Author: Bill Standke
Date: 16 Dec 2012 03:36 PM
ok kind of got it working. My output did not include comma column seperators or crlf for each row?

declare option ddtek:serialize "method=CSV:first=yes";


<table>
{
for $BusinessCatalog in /UDML/BusinessCatalog ,
$LogicalTableIDList in $BusinessCatalog/LogicalTableIDList
return
<row>
<catalogid>
{
/UDML/BusinessCatalog/BusinessCatalogID/text()
}
</catalogid>
<catalogname>
{
/UDML/BusinessCatalog/BusinessCatalogName/text()
}
</catalogname>
<logicaltableid>
{
/UDML/BusinessCatalog/LogicalTableIDList/LogicalTableID/text()
}
</logicaltableid>
</row>
}
</table>


After looking at the video I'm still not clear how you create the template structure by dragging a highlighted portion of the xml??

I created the template manually just fine.

Thanks

Posttop
Bill StandkeSubject: XML to CSV Video create csv template by dragging?
Author: Bill Standke
Date: 16 Dec 2012 06:15 PM
I figured it out...my query was wrong.

declare option ddtek:serialize "method=CSV:first=yes";

<table>
{
for $v in /UDML/BusinessCatalog/LogicalTableIDList/LogicalTableID
return
<row>
<catalogid>
{
data($v/../../BusinessCatalogID)
}
</catalogid>
<catalogname>
{
data($v/../../BusinessCatalogName)
}
</catalogname>
<logicaltableid>
{
$v/text()
}
</logicaltableid>
</row>
}
</table>

 
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.