Opened 14 years ago

Closed 14 years ago

#276 closed defect (fixed)

Export as CSV issues

Reported by: osjonathan Owned by: Fxp
Priority: major Milestone: v2.6.0 RC2
Component: General Version: v2.6.0RC1
Keywords: Cc:

Description

There seem to be several issues here, but I'll dump them all here as I'm not sure what the desired behaviour is. I have a metadata template I want to export. I do this this by checking next to it and going to "actions on selection" > Export (CSV). I am doing this as Admin and template owner.

a) The first time I did this I got a blank page, as well as several attempts afterward.

Eventually I get back a page that only contains: "schema id title abstract keyword LegalConstraints iso19139 111 Warwickshire County Council Template World gmd:accessConstraints :###### "

b) As you can see, there's a distinct lack of content there.

c) It's not looking very comma delimited.

d) The file when I go to save it is called .search rather than .csv (from the URL http://localhost:8080/geonetwork/srv/en/csv.search I guess).

e) The mimetype is text/plain. it should be text/csv I think (http://www.rfc-editor.org/rfc/rfc4180.txt)

Change History (3)

comment:1 by Fxp, 14 years ago

Owner: changed from geonetwork-devel@… to Fxp
Status: newassigned

Todo :

  • add in the documentation how to change separator (c).
  • (d) depends on browser probably.
  • rename Export CSV to Export TXT

comment:2 by osjonathan, 14 years ago

(c) - Personally I think the default delimiter should be a comma. (d) FF 3.6.6 and Opera call it "csv.search". IE calls it csv_search.$extension (dependent on what type you tell IE you want it saved as, i.e. txt, mht).

comment:3 by Fxp, 14 years ago

Resolution: fixed
Status: assignedclosed

Comma has not been used has the default one because it's a more frequent character in metadata content than tabs, which only appears if user copy/paste content into the editor.

More work is required to have a fully CSV compliant output (see enhancement #285).

In order to override default formatting, advanced user could still create their own template with mode="csv" in the metadata-{schema}.xsl matching the root element in order to create a one level tree structure. See csv.search.xsl.

Note: See TracTickets for help on using tickets.