|
next
|
 Subject: 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.
glosario.xslt
|
|
|
|