[GeoNetwork-users] Using /root/env/uuid in xml.metadata.processing

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to be
able to pick up the UUID or Database ID using the syntax /root/env/uuid or
/root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id values
come from- where they are set, or what other examples there are (apart from
ChangeDate).

I also couldn't find an example of an xsl in the process directory for any
of the published schemas, that uses this approach, I could only find it in
things like update-fixed-info and so on, so I can't tell if it's even
possible to access these values using this method, or if it's something
wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

Hi Lists,

An update on this. Someone kindly pointed me at the updated documentation
on github, and the idea of using xsl:param to get at the URL (which I could
then split into parts to get at the ID) but it's still not working for me.
I've expanded my XSL (attached) to include some tests and output some
messages given different results but it's failing to pick up the URL. If it
makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com> wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to be
able to pick up the UUID or Database ID using the syntax /root/env/uuid or
/root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id values
come from- where they are set, or what other examples there are (apart from
ChangeDate).

I also couldn't find an example of an xsl in the process directory for any
of the published schemas, that uses this approach, I could only find it in
things like update-fixed-info and so on, so I can't tell if it's even
possible to access these values using this method, or if it's something
wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

(attachments)

update_code.xsl (2.47 KB)

Hi Jo,

Check the Java core taking care of injecting fixed params (eg. baseUrl) +
all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing instructions.

update-fixed-info.xsl is a different call made by the DataManager (setting
the /env/uuid element). Better to look in xslt in process folder for
examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated documentation
on github, and the idea of using xsl:param to get at the URL (which I could
then split into parts to get at the ID) but it's still not working for me.
I've expanded my XSL (attached) to include some tests and output some
messages given different results but it's failing to pick up the URL. If it
makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still
stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to be
able to pick up the UUID or Database ID using the syntax /root/env/uuid or
/root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id values
come from- where they are set, or what other examples there are (apart from
ChangeDate).

I also couldn't find an example of an xsl in the process directory for
any of the published schemas, that uses this approach, I could only find it
in things like update-fixed-info and so on, so I can't tell if it's even
possible to access these values using this method, or if it's something
wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple
OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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 Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in

https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg. baseUrl) +
all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing instructions.

update-fixed-info.xsl is a different call made by the DataManager (setting
the /env/uuid element). Better to look in xslt in process folder for
examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated documentation
on github, and the idea of using xsl:param to get at the URL (which I could
then split into parts to get at the ID) but it's still not working for me.
I've expanded my XSL (attached) to include some tests and output some
messages given different results but it's failing to pick up the URL. If it
makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still
stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to be
able to pick up the UUID or Database ID using the syntax /root/env/uuid or
/root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory for
any of the published schemas, that uses this approach, I could only find it
in things like update-fixed-info and so on, so I can't tell if it's even
possible to access these values using this method, or if it's something
wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple
OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

2015-12-07 15:09 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

No, only the following are available as XSL params:

<xsl:param name="guiLang" select="'eng'"/>
<xsl:param name="baseUrl" select="''"/>
<xsl:param name="catalogUrl" select="''"/>
<xsl:param name="nodeId" select="''"/>

And defined here
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L209

I'm not sure which version you're using exactly.

Francois

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg. baseUrl) +
all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing instructions.

update-fixed-info.xsl is a different call made by the DataManager
(setting the /env/uuid element). Better to look in xslt in process folder
for examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated
documentation on github, and the idea of using xsl:param to get at the URL
(which I could then split into parts to get at the ID) but it's still not
working for me. I've expanded my XSL (attached) to include some tests and
output some messages given different results but it's failing to pick up
the URL. If it makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still
stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to
be able to pick up the UUID or Database ID using the syntax /root/env/uuid
or /root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory for
any of the published schemas, that uses this approach, I could only find it
in things like update-fixed-info and so on, so I can't tell if it's even
possible to access these values using this method, or if it's something
wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple
OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

So does this mean that I *can't* use the ID or UUID in my xsl? Surely there
must be a way of getting at them?

I think the documentation on this needs clarifying too- happy to help with
that once I get something that works for me :slight_smile:

Thanks

Jo

On Mon, Dec 7, 2015 at 2:13 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

2015-12-07 15:09 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

No, only the following are available as XSL params:

<xsl:param name="guiLang" select="'eng'"/>
<xsl:param name="baseUrl" select="''"/>
<xsl:param name="catalogUrl" select="''"/>
<xsl:param name="nodeId" select="''"/>

And defined here

https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L209

I'm not sure which version you're using exactly.

Francois

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg. baseUrl) +
all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing instructions.

update-fixed-info.xsl is a different call made by the DataManager
(setting the /env/uuid element). Better to look in xslt in process folder
for examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated
documentation on github, and the idea of using xsl:param to get at the URL
(which I could then split into parts to get at the ID) but it's still not
working for me. I've expanded my XSL (attached) to include some tests and
output some messages given different results but it's failing to pick up
the URL. If it makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still
stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to
be able to pick up the UUID or Database ID using the syntax /root/env/uuid
or /root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory for
any of the published schemas, that uses this approach, I could only find it
in things like update-fixed-info and so on, so I can't tell if it's even
possible to access these values using this method, or if it's something
wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for
multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

2015-12-07 15:16 GMT+01:00 Jo Cook <jocook@anonymised.com>:

So does this mean that I *can't* use the ID or UUID in my xsl? Surely
there must be a way of getting at them?

During processing, you have the metadata record so you can get the UUID eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L84
and remember that you've an "extra" section with
gmd:MD_Metadata/geonet:info which contains internal id, uuid, ... (that you
should catch during processing to not save that in db
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L59
).

To know what you're processing, you can always log it to console using:
<xsl:message><xsl:copy-of select="/"/></xsl:message>
in a template.

Francois

I think the documentation on this needs clarifying too- happy to help with
that once I get something that works for me :slight_smile:

Thanks

Jo

On Mon, Dec 7, 2015 at 2:13 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

2015-12-07 15:09 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

No, only the following are available as XSL params:

<xsl:param name="guiLang" select="'eng'"/>
<xsl:param name="baseUrl" select="''"/>
<xsl:param name="catalogUrl" select="''"/>
<xsl:param name="nodeId" select="''"/>

And defined here

https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L209

I'm not sure which version you're using exactly.

Francois

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <fx.prunayre@anonymised.com
> wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg. baseUrl) +
all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing
instructions.

update-fixed-info.xsl is a different call made by the DataManager
(setting the /env/uuid element). Better to look in xslt in process folder
for examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated
documentation on github, and the idea of using xsl:param to get at the URL
(which I could then split into parts to get at the ID) but it's still not
working for me. I've expanded my XSL (attached) to include some tests and
output some messages given different results but it's failing to pick up
the URL. If it makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still
stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem to
be able to pick up the UUID or Database ID using the syntax /root/env/uuid
or /root/env/id. When the transformation is done, these values are not
accessible- no errors are shown in the logs but the values are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory
for any of the published schemas, that uses this approach, I could only
find it in things like update-fixed-info and so on, so I can't tell if it's
even possible to access these values using this method, or if it's
something wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for
multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

Thanks Francois,

I got there in the end!

I think this sort of thing could be made a lot easier if the documentation
here
https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
was improved to include the information you have provided. I will see if I
can help with that, but it might need reviewing!

Jo

On Mon, Dec 7, 2015 at 2:25 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

2015-12-07 15:16 GMT+01:00 Jo Cook <jocook@anonymised.com>:

So does this mean that I *can't* use the ID or UUID in my xsl? Surely
there must be a way of getting at them?

During processing, you have the metadata record so you can get the UUID
eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L84
and remember that you've an "extra" section with
gmd:MD_Metadata/geonet:info which contains internal id, uuid, ... (that you
should catch during processing to not save that in db
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L59
).

To know what you're processing, you can always log it to console using:
<xsl:message><xsl:copy-of select="/"/></xsl:message>
in a template.

Francois

I think the documentation on this needs clarifying too- happy to help
with that once I get something that works for me :slight_smile:

Thanks

Jo

On Mon, Dec 7, 2015 at 2:13 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

2015-12-07 15:09 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

No, only the following are available as XSL params:

<xsl:param name="guiLang" select="'eng'"/>
<xsl:param name="baseUrl" select="''"/>
<xsl:param name="catalogUrl" select="''"/>
<xsl:param name="nodeId" select="''"/>

And defined here

https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L209

I'm not sure which version you're using exactly.

Francois

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <
fx.prunayre@anonymised.com> wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg.
baseUrl) + all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing
instructions.

update-fixed-info.xsl is a different call made by the DataManager
(setting the /env/uuid element). Better to look in xslt in process folder
for examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated
documentation on github, and the idea of using xsl:param to get at the URL
(which I could then split into parts to get at the ID) but it's still not
working for me. I've expanded my XSL (attached) to include some tests and
output some messages given different results but it's failing to pick up
the URL. If it makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm still
stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem
to be able to pick up the UUID or Database ID using the syntax
/root/env/uuid or /root/env/id. When the transformation is done, these
values are not accessible- no errors are shown in the logs but the values
are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory
for any of the published schemas, that uses this approach, I could only
find it in things like update-fixed-info and so on, so I can't tell if it's
even possible to access these values using this method, or if it's
something wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom,
Surrey, KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for
multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

Hi Jo, I tried to sum-up how XSL processing works in the doc
https://github.com/geonetwork/doc/blob/develop/en/user-guide/workflow/batchupdate-xsl.rst

Let me know if that sounds detailed enough.

Cheers.

Francois

2015-12-07 17:12 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Thanks Francois,

I got there in the end!

I think this sort of thing could be made a lot easier if the documentation
here
https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
was improved to include the information you have provided. I will see if I
can help with that, but it might need reviewing!

Jo

On Mon, Dec 7, 2015 at 2:25 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

2015-12-07 15:16 GMT+01:00 Jo Cook <jocook@anonymised.com>:

So does this mean that I *can't* use the ID or UUID in my xsl? Surely
there must be a way of getting at them?

During processing, you have the metadata record so you can get the UUID
eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L84
and remember that you've an "extra" section with
gmd:MD_Metadata/geonet:info which contains internal id, uuid, ... (that you
should catch during processing to not save that in db
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L59
).

To know what you're processing, you can always log it to console using:
<xsl:message><xsl:copy-of select="/"/></xsl:message>
in a template.

Francois

I think the documentation on this needs clarifying too- happy to help
with that once I get something that works for me :slight_smile:

Thanks

Jo

On Mon, Dec 7, 2015 at 2:13 PM, Francois Prunayre <fx.prunayre@anonymised.com
> wrote:

2015-12-07 15:09 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

No, only the following are available as XSL params:

<xsl:param name="guiLang" select="'eng'"/>
<xsl:param name="baseUrl" select="''"/>
<xsl:param name="catalogUrl" select="''"/>
<xsl:param name="nodeId" select="''"/>

And defined here

https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L209

I'm not sure which version you're using exactly.

Francois

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <
fx.prunayre@anonymised.com> wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg.
baseUrl) + all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing
instructions.

update-fixed-info.xsl is a different call made by the DataManager
(setting the /env/uuid element). Better to look in xslt in process folder
for examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated
documentation on github, and the idea of using xsl:param to get at the URL
(which I could then split into parts to get at the ID) but it's still not
working for me. I've expanded my XSL (attached) to include some tests and
output some messages given different results but it's failing to pick up
the URL. If it makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like to
understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm
still stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem
to be able to pick up the UUID or Database ID using the syntax
/root/env/uuid or /root/env/id. When the transformation is done, these
values are not accessible- no errors are shown in the logs but the values
are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory
for any of the published schemas, that uses this approach, I could only
find it in things like update-fixed-info and so on, so I can't tell if it's
even possible to access these values using this method, or if it's
something wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom,
Surrey, KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom,
Surrey, KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for
multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

Hi Francois,

This is really, really handy, many thanks!

Jo

On Thu, Jan 14, 2016 at 6:38 AM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

Hi Jo, I tried to sum-up how XSL processing works in the doc

https://github.com/geonetwork/doc/blob/develop/en/user-guide/workflow/batchupdate-xsl.rst

Let me know if that sounds detailed enough.

Cheers.

Francois

2015-12-07 17:12 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Thanks Francois,

I got there in the end!

I think this sort of thing could be made a lot easier if the
documentation here
https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
was improved to include the information you have provided. I will see if I
can help with that, but it might need reviewing!

Jo

On Mon, Dec 7, 2015 at 2:25 PM, Francois Prunayre <fx.prunayre@anonymised.com>
wrote:

2015-12-07 15:16 GMT+01:00 Jo Cook <jocook@anonymised.com>:

So does this mean that I *can't* use the ID or UUID in my xsl? Surely
there must be a way of getting at them?

During processing, you have the metadata record so you can get the UUID
eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L84
and remember that you've an "extra" section with
gmd:MD_Metadata/geonet:info which contains internal id, uuid, ... (that you
should catch during processing to not save that in db
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/add-resource-id.xsl#L59
).

To know what you're processing, you can always log it to console using:
<xsl:message><xsl:copy-of select="/"/></xsl:message>
in a template.

Francois

I think the documentation on this needs clarifying too- happy to help
with that once I get something that works for me :slight_smile:

Thanks

Jo

On Mon, Dec 7, 2015 at 2:13 PM, Francois Prunayre <
fx.prunayre@anonymised.com> wrote:

2015-12-07 15:09 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Francis,

In that case, I'm getting even more confused, sorry!

From the various parameters in
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207
only siteUrl seems to return anything when I use it as a parameter in my
xsl, and of course it doesn't return what I want.

https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl
suggests that I should be able to use id as a parameter, but that doesn't
return anything.

No, only the following are available as XSL params:

<xsl:param name="guiLang" select="'eng'"/>
<xsl:param name="baseUrl" select="''"/>
<xsl:param name="catalogUrl" select="''"/>
<xsl:param name="nodeId" select="''"/>

And defined here

https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L209

I'm not sure which version you're using exactly.

Francois

https://github.com/geonetwork/core-geonetwork/blob/3.0.x/docs/eng/developer/source/xml_services/metadata_xml_processing.rst
suggests that URL should work, but that doesn't return anything either!
Which parameter should I use to get at the UUID or the ID given the xsl
that I attached previously?

Thanks

Jo

On Mon, Dec 7, 2015 at 1:47 PM, Francois Prunayre <
fx.prunayre@anonymised.com> wrote:

Hi Jo,

Check the Java core taking care of injecting fixed params (eg.
baseUrl) + all URL params
https://github.com/geonetwork/core-geonetwork/blob/develop/services/src/main/java/org/fao/geonet/services/metadata/XslProcessing.java#L207

eg.
https://github.com/geonetwork/core-geonetwork/blob/develop/schemas/iso19139/src/main/plugin/iso19139/process/process-utility.xsl#L9

Then you can use all those as prameters in your processing
instructions.

update-fixed-info.xsl is a different call made by the DataManager
(setting the /env/uuid element). Better to look in xslt in process folder
for examples.

HTH.

Francois

2015-12-07 14:36 GMT+01:00 Jo Cook <jocook@anonymised.com>:

Hi Lists,

An update on this. Someone kindly pointed me at the updated
documentation on github, and the idea of using xsl:param to get at the URL
(which I could then split into parts to get at the ID) but it's still not
working for me. I've expanded my XSL (attached) to include some tests and
output some messages given different results but it's failing to pick up
the URL. If it makes a difference, this is with Geonetwork 2.10.4.

As well as fixing this particular problem, I would very much like
to understand how the /root/env variables are defined and when they can be
used.

Any assistance would be gratefully appreciated.

Jo

On Fri, Dec 4, 2015 at 4:48 PM, Jo Cook <jocook@anonymised.com
> wrote:

Hi Lists,

I'm re-posting a question I asked a few weeks ago, because I'm
still stuck.

I want to be able to use the xml.metadata.processing service to
automatically fill in a parameter in my xml with either the database id or
the metadata uuid for the record. A similar thing is done using
update-fixed-info.xsl in most schemas (mine is a variant of Gemini 2.2).

My xsl is in the process directory for my schema, but I don't seem
to be able to pick up the UUID or Database ID using the syntax
/root/env/uuid or /root/env/id. When the transformation is done, these
values are not accessible- no errors are shown in the logs but the values
are blank.

I can't find any documentation on where these /root/env/uuid or id
values come from- where they are set, or what other examples there are
(apart from ChangeDate).

I also couldn't find an example of an xsl in the process directory
for any of the published schemas, that uses this approach, I could only
find it in things like update-fixed-info and so on, so I can't tell if it's
even possible to access these values using this method, or if it's
something wrong with my xsl.

Can someone help me out here?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom,
Surrey, KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom,
Surrey, KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for
multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

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