|
next
|
 Subject: using the .conv file Author: Tony Lavinio Date: 06 Sep 2005 05:14 PM
|
Q1: also where is the file that the document wizard uses to convert the csv to xml ? is it an xslt file ?
A1: To go from .csv to .xml, the definitions live in a .conv file which
you create with the Convert-to-XML tool. There is an engine inside of
Stylus (which also can be licensed to run outside of Stylus) which
takes the .csv (or whatever) and the .conv and produces the .xml.
For a video tutorial of this, see the first video on page
http://www.stylusstudio.com/learn_convert_to_xml.html#converttoxml
Q2: is it possible to write a generic xslt that will access for example an odbc driver and convert dbase fields to xml ? is this covered in the ado to xml section ?
A2: ODBC is a different beast; it returns data in response to SQL/XML queries. For that, use the File|New|DB to XML Data Source option.
Again, you can save that SQL/XML, and use it to connect from ODBC
or JDBC to XSLT to XQuery. Except instead of a .conv file, you've
got an .rdbxml file.
For video tutorials on this, see
http://www.stylusstudio.com/learn_sql_xml.html#db_to_xml_1
and http://www.stylusstudio.com/learn_sql_xml.html#db_to_xml_2
Q3: finally, i have been supplied with files which contain characters in utf-8 but wish to convert them to us-ascii, but when i use the conversion process as within stylus studio and specify us-ascii,the xml document it creates specifies utf-8. Is this because the conversion process recognises the characters as not being us-ascii compliant ? the problem then is the csv gives me parsing errors which are resolved when i strip out the offending characters.
A3: Where are you specifying this? With Convert-to-XML, you'd specify
the input encoding as UTF-8, and the output encoding as US-ASCII. That
should do what you want. It's possible the input documents aren't
really UTF-8, but to be sure we'd be happy to take a look at one for
you. Just attach it with the little "Attach File" checkbox on the
reply-to-forum form.
thanks for the assistance
cheers
chris
|
|
|