Overriding dropdown list for specific editing view

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Overriding dropdown list for specific editing view

Jo Cook
Hi All,

I have the requirement to build a custom (simplified) editing view for
ISO19139 for making it easy to add records for non-spatial datasets.
This is done, but the customer has correctly pointed out that the
dropdown list for distribution format contains spatial formats and
what they really want to see is just non-spatial formats. I know this
list is derived from labels.xml and it uses gmd:name with an
additional context to limit it to the
gmd:distributionFormat/gmd:MD_Format parent element, but this is going
to be the case for non-spatial records too. Do I have options for
overriding this list, either directly in config-editor.xml or using
xpath logic in labels.xml to have a different list when (say)
gmd:hierachyLevelName = nonGeographicDataset?

Thanks

Jo

--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Overriding dropdown list for specific editing view

Jose Garcia
Hi Jo


I guess can be configured to check the xpath of the element containing if it's a spatial or non spatial metadata, but need to check if accepts any xpath condition.

Regards,
Jose García

On Tue, Jan 7, 2020 at 3:26 PM Jo Cook <[hidden email]> wrote:
Hi All,

I have the requirement to build a custom (simplified) editing view for
ISO19139 for making it easy to add records for non-spatial datasets.
This is done, but the customer has correctly pointed out that the
dropdown list for distribution format contains spatial formats and
what they really want to see is just non-spatial formats. I know this
list is derived from labels.xml and it uses gmd:name with an
additional context to limit it to the
gmd:distributionFormat/gmd:MD_Format parent element, but this is going
to be the case for non-spatial records too. Do I have options for
overriding this list, either directly in config-editor.xml or using
xpath logic in labels.xml to have a different list when (say)
gmd:hierachyLevelName = nonGeographicDataset?

Thanks

Jo

--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Overriding dropdown list for specific editing view

Jo Cook
Hi Jose,

There are certainly examples of this sort of syntax being used in 3.4.x onwards, but I'm struggling to find an xpath that works. I would have expected a literal xpath of the form /gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString='NonGeographicDataset' to work but it doesn't display the element. Does it need to be relative to the location I'm in?

Thanks

Jo

On Tue, Jan 7, 2020 at 2:59 PM Jose Garcia <[hidden email]> wrote:
Hi Jo


I guess can be configured to check the xpath of the element containing if it's a spatial or non spatial metadata, but need to check if accepts any xpath condition.

Regards,
Jose García

On Tue, Jan 7, 2020 at 3:26 PM Jo Cook <[hidden email]> wrote:
Hi All,

I have the requirement to build a custom (simplified) editing view for
ISO19139 for making it easy to add records for non-spatial datasets.
This is done, but the customer has correctly pointed out that the
dropdown list for distribution format contains spatial formats and
what they really want to see is just non-spatial formats. I know this
list is derived from labels.xml and it uses gmd:name with an
additional context to limit it to the
gmd:distributionFormat/gmd:MD_Format parent element, but this is going
to be the case for non-spatial records too. Do I have options for
overriding this list, either directly in config-editor.xml or using
xpath logic in labels.xml to have a different list when (say)
gmd:hierachyLevelName = nonGeographicDataset?

Thanks

Jo

--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent responses at that time, please visit support.astuntechnology.com or phone our office on 01372 744009


-- 
Sign up to our mailing list for updates on news, products, conferences, events and training

Astun Technology Ltd, Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech

Company registration no. 5410695. Registered in England and Wales. Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Overriding dropdown list for specific editing view

Francois Prunayre
Hi, the doc probably needs some update
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/schema-labels.xsd#L199-L223
because "$p1/" is not needed anymore like in the example provided by Jose. You can't use "/..." because it is relative to the element so use ancestor to move to parent nodes.

HTH

Francois

Le mar. 7 janv. 2020 à 17:19, Jo Cook <[hidden email]> a écrit :
Hi Jose,

There are certainly examples of this sort of syntax being used in 3.4.x onwards, but I'm struggling to find an xpath that works. I would have expected a literal xpath of the form /gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString='NonGeographicDataset' to work but it doesn't display the element. Does it need to be relative to the location I'm in?

Thanks

Jo

On Tue, Jan 7, 2020 at 2:59 PM Jose Garcia <[hidden email]> wrote:
Hi Jo


I guess can be configured to check the xpath of the element containing if it's a spatial or non spatial metadata, but need to check if accepts any xpath condition.

Regards,
Jose García

On Tue, Jan 7, 2020 at 3:26 PM Jo Cook <[hidden email]> wrote:
Hi All,

I have the requirement to build a custom (simplified) editing view for
ISO19139 for making it easy to add records for non-spatial datasets.
This is done, but the customer has correctly pointed out that the
dropdown list for distribution format contains spatial formats and
what they really want to see is just non-spatial formats. I know this
list is derived from labels.xml and it uses gmd:name with an
additional context to limit it to the
gmd:distributionFormat/gmd:MD_Format parent element, but this is going
to be the case for non-spatial records too. Do I have options for
overriding this list, either directly in config-editor.xml or using
xpath logic in labels.xml to have a different list when (say)
gmd:hierachyLevelName = nonGeographicDataset?

Thanks

Jo

--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent responses at that time, please visit support.astuntechnology.com or phone our office on 01372 744009


-- 
Sign up to our mailing list for updates on news, products, conferences, events and training

Astun Technology Ltd, Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech

Company registration no. 5410695. Registered in England and Wales. Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Overriding dropdown list for specific editing view

Jo Cook
Hi Francois,

Thanks, I have now managed to get exactly the layout that I want with a combination of "displayIf" and a template for adding new elements as snippets.

Jo

On Tue, Jan 7, 2020 at 4:31 PM Francois Prunayre <[hidden email]> wrote:
Hi, the doc probably needs some update
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/schema-labels.xsd#L199-L223
because "$p1/" is not needed anymore like in the example provided by Jose. You can't use "/..." because it is relative to the element so use ancestor to move to parent nodes.

HTH

Francois

Le mar. 7 janv. 2020 à 17:19, Jo Cook <[hidden email]> a écrit :
Hi Jose,

There are certainly examples of this sort of syntax being used in 3.4.x onwards, but I'm struggling to find an xpath that works. I would have expected a literal xpath of the form /gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString='NonGeographicDataset' to work but it doesn't display the element. Does it need to be relative to the location I'm in?

Thanks

Jo

On Tue, Jan 7, 2020 at 2:59 PM Jose Garcia <[hidden email]> wrote:
Hi Jo


I guess can be configured to check the xpath of the element containing if it's a spatial or non spatial metadata, but need to check if accepts any xpath condition.

Regards,
Jose García

On Tue, Jan 7, 2020 at 3:26 PM Jo Cook <[hidden email]> wrote:
Hi All,

I have the requirement to build a custom (simplified) editing view for
ISO19139 for making it easy to add records for non-spatial datasets.
This is done, but the customer has correctly pointed out that the
dropdown list for distribution format contains spatial formats and
what they really want to see is just non-spatial formats. I know this
list is derived from labels.xml and it uses gmd:name with an
additional context to limit it to the
gmd:distributionFormat/gmd:MD_Format parent element, but this is going
to be the case for non-spatial records too. Do I have options for
overriding this list, either directly in config-editor.xml or using
xpath logic in labels.xml to have a different list when (say)
gmd:hierachyLevelName = nonGeographicDataset?

Thanks

Jo

--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent responses at that time, please visit support.astuntechnology.com or phone our office on 01372 744009


-- 
Sign up to our mailing list for updates on news, products, conferences, events and training

Astun Technology Ltd, Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech

Company registration no. 5410695. Registered in England and Wales. Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.
_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent responses at that time, please visit support.astuntechnology.com or phone our office on 01372 744009


-- 
Sign up to our mailing list for updates on news, products, conferences, events and training

Astun Technology Ltd, Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech

Company registration no. 5410695. Registered in England and Wales. Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork