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 (modified template from yesterday's meeting memo):

  <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:

(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 server to hide the port and give the server a nice URL. We'll wait for Børre and other server gurus.

Next up

TODO:

  1. filtering (Tomi)
  2. filtered hit list (Tomi)
  3. filtered dictionary list (Tomi)
  4. proper article display (Tomi, Sjur)
  5. search feedback (Tomi)
    1. "Searching..."
    2. "No hits."
  6. 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, and because that will cause all translations to follow the same JSON structure - needs to be done in the XML conversion from the old terminology structure to the dict-ähnliches terminology structure ( Sjur)
  • refine the xsl to filter out "translations" identical to the head word ( Sjur, Tomi)
    • such translations will be found for all terms because of XInclude expansion, and might also be found elsewhere; the xsl is the correct place to filter them out - it is after XInclude expansion and before serialisation (thus before it reaches the client), and it should be pretty simple code, probably just a filter on the t element match, or a separate, empty and filtered t template.