Hi Simon Pigot,
Simon Pigot wrote:
It is implemented and ready to test on http://bluenettest.its.utas.edu.au
Note: the name of the service has changed from xml.metadata.get to
xml.metadocument.get and the only parameter required is the uuid -
everything else is the same.
Codelists and help are included in the document returned under
geonet:codelists and geonet:help
Thanks for this! I've just had a look the output of the template service and have a few ideas in relation to that:
- is the template the right place for outputting the geonet:codelists and geonet:help? Maybe in a future version we could add them as a separate service (or one service that can output different kinds of content). We'd need a separate code list and help instance anyway when build build up a form from scratch.
- I think the snippet service should hold references to the code lists (just as the template already has). Imagine we have an incomplete template or we build up our form from a blank document (say snippet parent=/ & child=gmd:MD_Metadata). Then we need to know that the following node for example is linked to a code list:
<geonet:child name="characterSet" prefix="gmd">
Currently the snippet service outputs the following (I've taken out the name spaces for readability):
<gmd:characterSet>
<gmd:MD_CharacterSetCode codeList="" codeListValue="">
<geonet:element ref="2" />
<geonet:attribute name="codeList" />
<geonet:attribute name="codeListValue" />
<geonet:attribute name="codeSpace" add="true" />
</gmd:MD_CharacterSetCode>
<geonet:element ref="1" />
<geonet:attribute name="gco:nilReason" add="true" />
</gmd:characterSet>
We're nearly there: we only need to fill in the codeList and codeListValue attributes in the service.
Something else, but related: in the template I notice that the reference to the code list is something like this:
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelist.xml#MD_CharacterSetCode" codeListValue="utf8"
The file gmxCodelist.xml doesn't exist (it is in fact gmxCodelists.xml), so I assume that GN takes a local code lists file and 'manually' creates the URL. I've got 2 possible suggestions:
1) Fix the URL so we can have our XSLT or XForms request the the code lists directly from the authoritive site (pro: always up2date, con: network latency and risk of failure when site is down or another name change)
or
2) Change the value of attribute codeList to: codeList="MD_CharacterSetCode" in the template and snippet service. This makes it much easier for us to find the correct codelist values based on the attributes (codeList and codeListValue) given (using XSLT 1.0).
I'd prefer suggestion 2 myself but. How do you feel about this? Would this be easy to implement? Or, now I come to think of it: is the id of the entry in the code list *always* the name of the node: gmd:MD_CharacterSetCode in this case? If so, then it is much easier and no further work needs to be done on your side.
Thanks again for all the work you're doing on this.
Cheers, Roald