glossary xml to text or word?

Re: glossary xml to text or word?

Höfundur Joseph Rézeau -
Number of replies: 5
Mynd af Core developers Mynd af Particularly helpful Moodlers Mynd af Plugin developers Mynd af Testers Mynd af Translators

Hi Mike,

First of all I'm wondering why exactly you would like to have your glossary as a MSWord document. Surely it takes a lot of the interest out of Moodle's autolink system.

You are aware that there is a printer-friendly output of glossaries, which you can output to printer, or virtual printer and from there to e.g. PDF (see this discussion)?

Anyway, if you are using a recent version of Word (Office 2003) you can get a user-friendly output of a Moodle glossary XML file, if you link it to an *.XSL stylesheet.

  • Download the attached moodleglossary.xsl stylesheet and save to your computer.
  • Open MS Word and open your glossary, e.g. myglossary.xml.
  • MS Word will show the XML tree structure of the file and the data.
  • It will ask you if you want to do an "XSLT transform", using an external file (or something like that, I don't have an English version of MS Word). Navigate to your moodleglossary.xsl ... et voila what you'll see, e.g. using the Moodle glossary_of_common_terms:

Concept: applet
Definition: <nolink>Applets are small programs written in Java and embedded within web pages. Most recent browsers can run these small programs if you have Java installed on your computer.</nolink>

Concept: CSS
Definition: Abbreviation for "Cascading Style Sheets". CSS defines styles and colours and how they should be applied to a web page.

Please note that if your glossary definitions have embedded images, HTML formatting, etc. all will be lost. Hope that helps.

Joseph

In reply to Joseph Rézeau

Re: glossary xml to text or word?

Höfundur Joseph Rézeau -
Mynd af Core developers Mynd af Particularly helpful Moodlers Mynd af Plugin developers Mynd af Testers Mynd af Translators
Hi Mike,
Did my 26 Sep. post help you at all? Did you try out my attached xsl stylesheet? Just curious to know.wink
Joseph
In reply to Joseph Rézeau

Re: glossary xml to text or word?

Höfundur Nathan Ducker -
Joseph,
I am trying to export my glossary items to excel / word so that I can print them up / cut them out and then give the students a vocabulary describing activity so that they can remind themselves of new words at the beginning of a class.

I read through the documentation until I found your post on this page http://moodle.org/mod/forum/discuss.php?d=40357#p476617, but it seems that the link has gone dead, so I have no way of testing it out to see if it works.

Is it possible to post the work sheet again if you still have it?
Thanks,
Nathan