Thanks Francois, one related query (asked in another thread but didn’t get answer yet) but I think is important as I am asking about a possible bug in metadocument creation.
Is not a geonet:child element created only for the missing elements/attributes in the metadata being shown? That is, a geonet:child element should be put for hierarchyLevel only if it is missing in the metadata. But I found it is added for hierarchyLevel even though it is present.
I found this for some other elements too. I just want to know if it is a bug here in metadocument creation? If not, what can be the reason that a geonet:child appears for an element even when it exists in the metadata?
Thanks a lot again.
···
On Mon, Oct 28, 2013 at 12:29 PM, Francois Prunayre <fx.prunayre@anonymised.com> wrote:
–
Systems Programmer
kCube Consultancy Services
2013/10/25 Ameet Chaudhari <ameet.chaudhari@anonymised.com>
I mean instead of this (as is written in the INSPIRE view):
<xsl:apply-templates mode=“elementEP” select=“gmd:hierarchyLevel| geonet:child[string(@name)=‘hierarchyLevel’]”>
…
…
should not the correct way be like this:
<xsl:apply-templates mode=“elementEP” select=“gmd:hierarchyLevel”>
…
<xsl:if test=“not(gmd:hierarchyLevel)”>
<xsl:apply-templates mode=“elementEP”
select=“geonet:child[string(@name)=‘hierarchyLevel’]”>
…
Yes/No in that case, you’ll not allow to add hierarchyLevel if one (or more) is set which may be what you want, but the schema cardinality is 0…*. So it depends on what you want to display on your editor view.
Cheers.
Francois
Please confirm this, thanks a lot and best Regards.
Ameet
On Thu, Oct 24, 2013 at 1:53 PM, Ameet Chaudhari <ameet.chaudhari@anonymised.com…31…> wrote:
Hi Francois,
Thanks a lot for this tip, I knew about the !, but was not aware of this “metadocument” thing created by geoserver. Thanks a lot to the Geonetwork team for creating this ! facility
One clarification - as you said “…/…/gmd:hierarchyLevel | …/…/geonet:child[string(@name)=‘hierarchyLevel’] means match hierarchyLevel if it exists in the metadata or the non existing element for hierarchyLevel from the schema definition (geonet:child)”, but I guess it is not ‘or’ here rather it matches hierarchyLevel (it exists in my metadata) AND also the non existing element and I end up seeing both of them rendered below each other. That is, I see the hierarchyLevel with codelist value first and below it I also see its combobox populated from schema definition. So I guess this whole selection works well for non-existing elements but ends up showing it two times if the element exists, am I right?
Best Regards
Ameet
–
Systems Programmer
kCube Consultancy Services
On Thu, Oct 24, 2013 at 12:09 PM, Francois Prunayre <fx.prunayre@anonymised.com> wrote:
Hi Ameet,
–
Systems Programmer
kCube Consultancy Services
2013/10/23 Ameet Chaudhari <ameet.chaudhari@anonymised.com>
Hi,
Can anyone clear the meaning/effect of following selection:
…/…/geonet:child[string(@name)=‘elementName’] ?
It is there for a lot of elements in each schema’s XSL file.
You should look into the document processed to better get an idea of what is happening. Add a “!” after the service name to see the XML before XSLT is applied. eg.
http://localhost:8080/geonetwork/srv/eng/edit!?id=20
Basically, GeoNetwork create a “metadocument” which is composed of the record to edit and the schema definition. The schema definition contains info about cardinality, subelements, …
So …/…/gmd:hierarchyLevel | …/…/geonet:child[string(@name)=‘hierarchyLevel’] means match hierarchyLevel if it exists in the metadata or the non existing element for hierarchyLevel from the schema definition (geonet:child).
Writing a proposal to improve the editor, I’ll try to better describe all this.
HTH.
Francois
For example, in ISO19139 schema’s metadata-inspire.xsl (used for inspire view), the selection for gmd:hierarchyLevel element is done as follows
<xsl:apply-templates mode=“elementEP” select=“…/…/gmd:hierarchyLevel | …/…/geonet:child[string(@name)=‘hierarchyLevel’]”>
…
</xsl:apply-templates>
The selection …/…/geonet:child[string(@name)=‘hierarchyLevel’] actually shows two child elements of hierarchyLevel in a combobox in GUI (gmd:MD_ScopeCode, gmx:MX_ScopeCode), even though in my record there is only one child element (gmd:MD_ScopeCode).
Since this is a geonet prefixed path, I am not able to understand how this selects elements.
My Regards and appreciation for any help on this.
Ameet
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork