-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export as csv not working as expected #13
Comments
I found the solution to customize the output of the EXPORT(CSV) function. These are the two files to consider:
In the first one, as suggested to me by @josegar74, you have to add a similar line in between the abstract and category elements:
About cloud coverage percentage in particular, please remember to add the namespace in the header because it is missing: Then aI commented all the other lines I'm not interested in but: About the second file, csv-search.xsl, I found that to avoid printing automatically the 3 columns:
and
In this way I had the possibility to get the desired output: "uuid","title","cloud_coverage_percentage","category","date-creation" If you do not want to see the last comma after the last value (date-creation in my case) you can add a small piece of code at the end of the file:
I will try to open a pull request for this. I hope this additional information could be useful for someone else. |
Next week we are organizing a documentation codesprint https://github.com/geonetwork/core-geonetwork/wiki/Documentation-codesprint-November-2019, maybe you would have time to update the doc page containing old info with this new instruction ? |
I will do it |
I would like to customize the export as csv function in Geonetwork 3.8.1.
The documentation I found here seems to be old.
[https://geonetwork-opensource.org/manuals/3.8.x/en/user-guide/export/index.html]
I think that the file to edit is the tpl-csv.xsl which, in my case, is located here
geonetwork/WEB-INF/data/config/schema_plugins/iso19115-3.2018/layout/tpl-csv.xsl
The output I would like to have is the following one:
"title","cloud coverage","category","date-creation" "S2A_MSIL1C_20151127T103352_N0204_R108_T32TLS_20151127T103440","36.6172","dataset","2015-11-27T10:34:40"
I did some test but I'm only able to have
"schema","uuid","id","cit:title","gco:Real","category","date-creation" "iso19115-3.2018","89d82f0a-051e-11ea-80ac-02000a08f492","1155","S2A_MSIL1C_20151127T103352_N0204_R108_T32TLS_20151127T103440","36.6172","dataset","2015-11-27T10:34:40",
How can I edit in a more correct way the tpl-csv.xsl?
The text was updated successfully, but these errors were encountered: