Hi Pete,

 

Thanks for the ideas. It looks like I cannot load a document using webDav 
without adding a unusual file extension to the mime settings for the database. 
At this point I’m reluctant to add an unusual file extension to the mime 
settings because of shared use of the database.  However I found that I can 
decode the binary document into text using xdmp:binary-decode supplying either 
a value of “UTF-8” or “ISO-8859-1” and then build an xml document from the 
parsed text.

 

This kind of leads into the next issue I am facing, and that is importing, 
displaying, and exporting HTML character entities such as ´ .

 

Thanks!

 

Tim

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Pete Aven
Sent: Wednesday, September 03, 2014 1:11 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Text mime mapping a file with an unusual 
file extension

 

Either. You can set mimetype implicitly or explicitly in MarkLogic:

 

Implicitly:

http://docs.marklogic.com/guide/ingestion/formats#id_39990 (See Mimetypes in 
left pane on Admin UI)

 

Explicitly:

http://docs.marklogic.com/guide/ingestion/formats#id_38692

 

The pro tip suggested in the docs is to explicitly set the format.

 

Pete

 

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Tim
Sent: Wednesday, September 03, 2014 11:01 AM
To: 'MarkLogic Developer Discussion'
Subject: [MarkLogic Dev General] Text mime mapping a file with an unusual file 
extension

 

Hi Folks,

 

I am loading a document into MarkLogic that has an unusual file extension which 
for sale of discussion I will call “.oth”.  If I rename the file with a .txt 
extension then I can easily tokenize it as a huge text string, but a 
nonstandard extension it is not treated as text.  I want to associate the file 
as a text file, but what I would like to know is if I can import the file, 
e.g., File.oth using webdav and then set the mime type in my xquery, or if the 
mime type needs to be preconfigured in the database.

 

Suggestions?

 

Thank you!

 

Tim M.

 

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to