in xml/schema/xxx/loc/yy/labels.xml and codelist.xml we defined elements
as :
<element name="gmd:CI_OnlineResource">
<label>OnLine resource</label>
<description>information about online sources from which the resource
can be
obtained</description>
</element>
... and search translation using local-name and ns uri :
<xsl:variable name="nm" select="name(.)"></xsl:variable>
<xsl:variable name="ns" select="namespace-uri(.)"></xsl:variable>
<xsl:variable name="schematitle" select="string(/root/gui/*[name(.)=
$schema]/element[@name=$nm and @ns=$ns]/label)"/>
Does this sounds good to you ? Do you see any side effect on changing
loc files for schema ?
Anyone facing similar issue ?
Sounds like a viable solution - out of interest, what is the use case where you would have a different prefix bound to the http://www.isotc211.org/2005/gmd URI? (I know its possible but its kind of confusing if you're simple minded like me and like it to be a URL and resolve to an XSD with info about the elements in that namespace :-))
I've used a slightly different solution for profile support that uses the current layout - for any element in the metadata it looks up the label/help string (from the labels.xml file for the profile eg. iso19139.mcp) and if not found there it refers to the iso19139 label/help info. The idea is that the profile only has info on the elements specific to it. This could still work with your labels.xml structure - its specific to the profile problem.
Cheers,
Simon
Francois-Xavier Prunayre wrote:
Hi all,
in xml/schema/xxx/loc/yy/labels.xml and codelist.xml we defined elements
as :
<element name="gmd:CI_OnlineResource">
<label>OnLine resource</label>
<description>information about online sources from which the resource
can be
obtained</description>
</element>
... and search translation using local-name and ns uri :
<xsl:variable name="nm" select="name(.)"></xsl:variable>
<xsl:variable name="ns" select="namespace-uri(.)"></xsl:variable>
<xsl:variable name="schematitle" select="string(/root/gui/*[name(.)=
$schema]/element[@name=$nm and @ns=$ns]/label)"/>
Does this sounds good to you ? Do you see any side effect on changing
loc files for schema ?
Anyone facing similar issue ?
On mer, 2008-09-24 at 21:45 +1000, Simon Pigot wrote:
Sounds like a viable solution - out of interest, what is the use case
where you would have a different prefix bound to the http://www.isotc211.org/2005/gmd URI?
2 UC :
* when harvesting some catalogue or folder with XML records (maybe not
managed by GeoNetwork)
* when processing using XSLT on import and sometimes according to the
XSL, I have output with http://www.isotc211.org/2005/gmd as default ns
and also bind to gmd prefix.... not sure if we could force a ns URI /
prefix binding in xsl output properties ?
I've used a slightly different solution for profile support that uses
the current layout - for any element in the metadata it looks up the
label/help string (from the labels.xml file for the profile eg.
iso19139.mcp) and if not found there it refers to the iso19139
label/help info.
This is nice for profils and we have to keep that behaviour (which is in
trunk already).