Opened 12 years ago
Closed 12 years ago
#938 closed defect (worksforme)
Distribution : TransferOptions : Name expressed as gmx:MimeFileType should be gco:CharacterString
Reported by: | ebleys | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | v2.8.0 |
Component: | Metadata standards | Version: | |
Keywords: | Cc: |
Description
XML injection issue: CI_OnlineResource/name gets reset to gmx:MimeFileType but it uses the fileTag as content (eg myDocument.doc). a) these are clearly not MimeFileTypes => validation error b) that is not the intent of this element
(should provide a text box to give the URL a useful title)
Note:
See TracTickets
for help on using tickets.
My reading of the gmx:MimeFileType is that the mime type is present as a type attribute - string content is the file name with that mime type. So for example you should see something like:
<gmx:MimeFileType type="text/plain">MyDocument.txt</gmx:MimeFileType>
GeoNetwork uses this as a substitute for gco:CharacterString (which is quite valid) so that searches can be made for records with content that has a certain mime type. Since it's a valid substitution for gco:CharacterString and it contains the content that would be in the CharacterString anyway, it's a pretty light substitute and it should be supported by any other packages that support ISO XSDs. It also adds a useful search feature.
BTW: the mime type is calculated in update-fixed-info.xsl using a configurable mime type package (see WEB-INF/mime-type.properties).