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
Nicolas WahlSubject: Help to Convert cvs file to XLM
Author: Nicolas Wahl
Date: 20 Jan 2005 07:39 AM
Hi,
I am a brand new user to Stylus Studio and XML and I need some help.

I have to create a XML file to upload a glossary to my site.
I attach my file "glossary.xsd", with the desired schema.
Also, my input file: "Glosario1.txt", in this case
the separator character is a colon, and it has 2 fields:
"CONCEPT", separated by the colon from the second field "DEFINITION".
The texts are spanish, with input and output encoding="windows-1250".

I have done my best efforts to do this conversion, but could
not get it done.
Thanks for your help,
Nicolas


Documentglossary.xsd
glossary.xsd

UnknownGlosario1.txt
Glosario1.txt

Postnext
Tony LavinioSubject: Help to Convert cvs file to XLM
Author: Tony Lavinio
Date: 20 Jan 2005 01:48 PM
First, to make this simpler, I'm attaching the XSLT document that
phase 2 below does right to this message. But I'm also giving you
the instructions so you know what I did. You will have to do phase
1 yourself.

Phase 1: the converter
1. File|New|Convert to XML
2. Choose your Glosario1.txt file
3. Set BOTH the input and the output encodings to windows-1250
(Note that the entries for "Aglabíes" and "Iconografía" are missing their colons.)
(Also, some of your entries also include a colon in the description, but we'll take care of that later in the XSLT.)
4. Change the name of the first field from <field> to <concept>. We'll leave the others alone for now.
5. Save this as glosario.conv. If you want to see how it looks, use Preview (the green triangle)

Phase 2: the xslt
1. I used the File|Document Wizards to convert the XSD you presented into XML, which I then used as the framework of the XSLT.
2. File|New|XSLT Document
3. For Source XML URL, press the [...] button and choose your Glosario1.txt file, and put a [x] in the "Convert to XML Using Adapter" box. Press OK.
4. Then, expand the "Convert to XML Definitions" item and choose your Glosario.conv file and press OK.
5. Press OK to save the Scenario Properties.
6. Paste in the boilerplate text from the Document Wizard window.
7. Drag the nodes from the right-hand window to where they belong in the XSLT.
8. Finally, we'll wrap the reference to the description in a for-each to handle the colons that were dropped by the Convert-to-XML engine.
9. There are a bunch of elements in the boilerplate that you will have to fill in the values for, but this code should populate the glossary texts for you.


Documentglosario.xslt

Postnext
Nicolas WahlSubject: Help to Convert cvs file to XLM
Author: Nicolas Wahl
Date: 24 Jan 2005 09:42 AM
Tony, thanks a lot.

Sorry bothering you, but when I do
"Phase 2, 5. Press OK to save the Scenario Properties.",
my PC hangs consistently, al the time and I can´t go to the next step.
Can I have a configuration problem?
I´m using W2000 Sp3, Stylus ProfEd build 6.1 build 287e, 1.5.0_01-b08 Java

Any suggestion, please?

Postnext
Ivan PedruzziSubject: Help to Convert cvs file to XLM
Author: Ivan Pedruzzi
Date: 24 Jan 2005 11:11 PM
Hi Nicolas,

The error you are experiencing is caused by the JVM 1.5.
The problem will be fixed with the next update.

The only work around I can suggest for now is to use JVM 1.4

Ivan

Postnext
Tony LavinioSubject: Help to Convert cvs file to XLM
Author: Tony Lavinio
Date: 25 Jan 2005 04:07 PM
The next patch release will include a fix for this.

Posttop
Tony LavinioSubject: Help to Convert cvs file to XLM
Author: Tony Lavinio
Date: 03 Feb 2005 06:46 PM
Just as a note, the new patch 287g is available, and
include the solution for this.

 
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.