User:Zai Lynch/Sandbox/Glossword

From Second Life Wiki
Jump to: navigation, search

Downloads

Beginning

Replace

<mtf>

with

<?xml version='1.0' encoding='UTF-8' ?>
<glossword version="1.8.11">


Middle Part

Red text might have different values, blue text needs to be parsed.
Most terms got this format:

Input Output
<conceptGrp><concept>1</concept><languageGrp><language type="English" lang="EN"></language><termGrp><term>TERM <line><term><![CDATA[TERM
</term><transacGrp><transac type="origination">local</transac><date>2008-10-21T17:14:58</date></transacGrp><transacGrp><transac type="modification">simone</nowiki></transac><date></nowiki>2008-10-21T17:17:48</date></transacGrp></termGrp></languageGrp><languageGrp><language type="German" lang="DE"></language><termGrp><term>TRANSLATION ]]></term><defn><trns lang="106"><![CDATA[TRANSLATION
</term><transacGrp><transac type="origination">local</transac><date>2008-10-21T17:14:58</date></transacGrp><transacGrp><transac type="modification">local</transac><date>2008-10-21T17:14:58</date></transacGrp></termGrp></languageGrp><transacGrp><transac type="origination">local</transac><date>2008-10-21T17:14:58</date></transacGrp><transacGrp><transac type="modification">simone</nowiki></transac><date></nowiki>2008-10-21T17:17:48</date></transacGrp><languageGrp><language type="French" lang="FR"></language><termGrp><term>TRANSLATION ]]></trns><trns lang="105"><![CDATA[TRANSLATION
</term><transacGrp><transac type="origination">simone</nowiki></transac><date></nowiki>2008-10-21T17:17:48</date></transacGrp><transacGrp><transac type="modification">simone</nowiki></transac><date></nowiki>2008-10-21T17:17:48</date></transacGrp></termGrp></languageGrp></conceptGrp> ]]></trns><![CDATA[]]></defn></line>


Some terms got a description as well, which is placed in between </transacGrp> and </termGrp>

<conceptGrp><concept>31</concept><languageGrp><language type="English" lang="EN"></language><termGrp><term>2nd Life</term><transacGrp><transac type="origination">local</transac><date>2008-10-21T17:14:59</date></transacGrp><transacGrp><transac type="modification">simone</transac><date>2008-10-21T17:17:38</date></transacGrp><descripGrp><descrip type="Definition">An interactive 3d virtual world almost completely built by the residents operated by Linden Lab of San Francisco, California, USA. Abbreviated SL. </descrip></descripGrp></termGrp></languageGrp><languageGrp><language type="German" lang="DE"></language><termGrp><term>2. Leben</term><transacGrp><transac type="origination">local</transac><date>2008-10-21T17:14:59</date></transacGrp><transacGrp><transac type="modification">local</transac><date>2008-10-21T17:14:59</date></transacGrp></termGrp></languageGrp><transacGrp><transac type="origination">local</transac><date>2008-10-21T17:14:59</date></transacGrp><transacGrp><transac type="modification">simone</transac><date>2008-10-21T17:17:38</date></transacGrp><languageGrp><language type="French" lang="FR"></language><termGrp><term>2nd Life</term><transacGrp><transac type="origination">simone</transac><date>2008-10-21T17:17:38</date></transacGrp><transacGrp><transac type="modification">simone</transac><date>2008-10-21T17:17:38</date></transacGrp></termGrp></languageGrp></conceptGrp>

The description would need to be placed in the last outputline like this:

]]></trns><![CDATA[An interactive 3d virtual world almost completely built by the residents operated by Linden Lab of San Francisco, California, USA. Abbreviated SL.]]></defn></line>

End Of File

Replace

</mtf>

with

</glossword>