Copy link to clipboard
Copied
Trying to get a glossary from a previous version of RH into RH 8. I only have the published version of the old.
The .glo file has the format:
<?xml version="1.0" encoding="utf-8"?>
<glossary version="1.0">
<glossentry>
<glossterm>blah</glossterm>
<glossdef>blah blah</glossdef>
</glossentry>
.
.
.
</glossary>
the older file had the format
<?xml version='1.0' encoding='utf-8' ?>
<glossarydata>
<entry name="blah" value="blah blah" />
I edited the content of the old file to have the xml tags in the .glo, and saved the old as a .glo extension.
But when I import the old.glo, the list is empty. Any ideas?
Hi,
I'm glad that it's working now. Just one last remark (I don't know when to shut up 😞
Even when a file is valid XML (that means that the structure is correct, no typo's in tag names), doesn't mean that an application can read it. A system must 'decode' the XML to read the data and if you leave out data or rename tags, the file can still be valid XML, while the program cannot read it. In your case, two XML declarations killed it.
Greet,
Willam
Copy link to clipboard
Copied
I thought that once you had it in the new XML .glo format, you don't need to import it all - just replace the existing one, right?
Copy link to clipboard
Copied
Well, I have a few additional items in the current project, so I thought merging the glossary from the old project would give me the best of both worlds.
The whgdta01.xml file was a "published form" from Rh6.
Copy link to clipboard
Copied
Hi,
Make sure you use the exact structure of the file. You probably misspelled somewhere or used the wrong tag. Obey the XML file structure, otherwise the glossary won't work. As you said, the structure is like this:
<?xml version="1.0" encoding="utf-8"?>
<glossary version="1.0">
<glossentry>
<glossterm>Term1</glossterm>
<glossdef>Term 1 definition</glossdef>
</glossentry>
<glossentry>
<glossterm>Term2</glossterm>
<glossdef>Term 2 definition</glossdef>
</glossary>
Greet,
Willam
Copy link to clipboard
Copied
Willam,
There were no XML errors (according to the online validator at http://www.w3schools.com/XML/xml_validator.asp)
The sole error at http://www.validome.org/xml/validate/ is an undeclared "declaration of element 'glossary'".
However, the file did have two encoding statements:
<?xml version='1.0' encoding='utf-8'?>
<?xml version="1.0" encoding="utf-8"?>
(which was not an error in either validator)
When I removed one, the glossary magically had info.
Copy link to clipboard
Copied
Hi,
I'm glad that it's working now. Just one last remark (I don't know when to shut up 😞
Even when a file is valid XML (that means that the structure is correct, no typo's in tag names), doesn't mean that an application can read it. A system must 'decode' the XML to read the data and if you leave out data or rename tags, the file can still be valid XML, while the program cannot read it. In your case, two XML declarations killed it.
Greet,
Willam