[GeoNetwork-devel] Editor on Save XSL selection not working

Hi,

For GN 2.10.x, we have a XSL, update-fixed-info.xsl, in each schema that
applies when saving editor changes. In it, I want to handle
gmd:verticalElement (ISO19139), but I'm not able to match it. Even other
children of gmd:extent like gmd:temporalElement etc. do not match.

Even simplest of matching does not work:
<xsl:template match="gmd:verticalElement" />
<xsl:template match="gmd:temporalElement" />
<xsl:template match="gmd:geographicElement" />

None of the above works in update-fixed-info.xsl. I've handled many other
elements in this XSL without any issue. I checked that gmd:extent in fact
is matched but none of its child elements.

Is this by design or a bug. what is the way around if I want to handle
verticalElement or any other child of gmd:extent in this XSL?

Thanks and Regards
Ameet

Hi Ameet,

On Mon, Dec 15, 2014 at 7:56 AM, Ameet Chaudhari
<ameet.chaudhari@anonymised.com> wrote:

Hi,

For GN 2.10.x, we have a XSL, update-fixed-info.xsl, in each schema that
applies when saving editor changes. In it, I want to handle
gmd:verticalElement (ISO19139), but I'm not able to match it. Even other
children of gmd:extent like gmd:temporalElement etc. do not match.

First a quick stupid question, just in case: Are you trying with a
metadata that has this elements? You are only able to match it on a
metadata that contains the elements you want to match. It is a very
silly question and knowing your previous questions on the list I don't
think you will fail on something that simple, but we all have a bad
day sometimes...

Even simplest of matching does not work:
<xsl:template match="gmd:verticalElement" />
<xsl:template match="gmd:temporalElement" />
<xsl:template match="gmd:geographicElement" />

None of the above works in update-fixed-info.xsl. I've handled many other
elements in this XSL without any issue. I checked that gmd:extent in fact is
matched but none of its child elements.

At the end of the xsl:template that matches (gmd:extent), do you call
again a template match recursively?

Something like:

      <xsl:apply-templates select="*" />

Is this by design or a bug. what is the way around if I want to handle
verticalElement or any other child of gmd:extent in this XSL?

Thanks and Regards
Ameet

Regards,
María.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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

Hi Maria,

···

On Mon, Dec 15, 2014 at 12:36 PM, María Arias de Reyna <delawen@anonymised.com> wrote:

Hi Ameet,

On Mon, Dec 15, 2014 at 7:56 AM, Ameet Chaudhari
<ameet.chaudhari@anonymised.com> wrote:

Hi,

For GN 2.10.x, we have a XSL, update-fixed-info.xsl, in each schema that
applies when saving editor changes. In it, I want to handle
gmd:verticalElement (ISO19139), but I’m not able to match it. Even other
children of gmd:extent like gmd:temporalElement etc. do not match.

First a quick stupid question, just in case: Are you trying with a
metadata that has this elements? You are only able to match it on a
metadata that contains the elements you want to match. It is a very
silly question and knowing your previous questions on the list I don’t
think you will fail on something that simple, but we all have a bad
day sometimes…

Oh I wish this should have been the case so atleast it would’ve solved quickly :), but not so :(. That’s the first thing I had checked. All the three children of gmd:extent are present in the metadata and also, the metadata xml is valid. Neither the elements are missing nor I’m opening the wrong metadata in editor.

Even simplest of matching does not work:
<xsl:template match=“gmd:verticalElement” />
<xsl:template match=“gmd:temporalElement” />
<xsl:template match=“gmd:geographicElement” />

None of the above works in update-fixed-info.xsl. I’ve handled many other
elements in this XSL without any issue. I checked that gmd:extent in fact is
matched but none of its child elements.

At the end of the xsl:template that matches (gmd:extent), do you call
again a template match recursively?

Something like:

<xsl:apply-templates select=“*” />

Well far below is a template that matches like below, used for some namespace corrections.
<xsl:template match=“gmd:*”>

But this is there from long long time and anyway all other elements are matching properly. gmd:extent also matches at the same place ( If I replace the line for gmd:verticalElement with the one for gmd:extent, it matches! ).

Even then I will check by commenting that out and let you know.

Thanks,

Ameet

Is this by design or a bug. what is the way around if I want to handle
verticalElement or any other child of gmd:extent in this XSL?

Thanks and Regards
Ameet

Regards,
María.


Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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