2013-05-03- Risten2 Meeting
Risten2 meeting
Status
- added an xml output option for article fetching
Still problems with nested copies of the same element. Possible solution
<xsl:template match="mg|tg|t"> <xsl:copy> <xsl:attribute name="json:array">true</xsl:attribute> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template>
Issue solved! JSON structure produced:
{ "article" : [ { "dict" : "SD-terms", "name" : "Sametingets termsamling", "term" : "administrator", "e" : { "id" : "administrator\\S", "lg" : { "l" : { "pos" : "S", "orthstat" : "main", "#text" : "administrator" } }, "mg" : [{ "idref" : "1598", "termstatus" : "main", "classtop" : "F", "classmid" : "F0000", "classbtm" : "FN0010", "tg" : [{ "xml:lang" : "sme", "t" : ["hálddašeaddji"] }, { "xml:lang" : "nor", "t" : ["administrator"] }, { "xml:lang" : "fin", "t" : ["hallintohenkilö"] }, { "xml:lang" : "swe", "t" : ["administratör"] } ], "def" : "forvalter, bestyrer\n leder av en administrasjon" } ] } }, { "dict" : "nobsme", "name" : "Norsk-nordsamisk ordbok", "term" : "administrator", "e" : { "freq" : "$4676", "lg" : { "l" : { "pos" : "N", "#text" : "administrator" } }, "mg" : [{ "tg" : [{ "xml:lang" : "sme", "t" : [{ "pos" : "N", "type" : "NomAg", "freq" : "506", "#text" : "hálddašeaddji" } ] }] }] } } ] }
URL's for different types of article serialisation:
- XML: http://129.242.102.171:3010/exist/restxq/risten/article/Kolvik
- JSON: http://129.242.102.171:3010/exist/restxq/risten/article-json/Kolvik
(IP address will of course change later, but the REST calls stay the same.)
Tomi started to look at apache on the XServe, but doesn't know how to set up the
Next up
TODO:
- filtering (Tomi)
- filtered hit list (Tomi)
- filtered dictionary list (Tomi)
- proper article display (Tomi, Sjur)
- search feedback (Tomi)
- "Searching..."
- "No hits."
- "Searching..."
- set up server on the XServe - or on gtweb? (Børre)
XML changes:
- add @POS to all translations, both because it can be useful to the end user,
- refine the xsl to filter out "translations" identical to the head word
- such translations will be found for all terms because of XInclude expansion,
- such translations will be found for all terms because of XInclude expansion,