From: Andrzej J. T. <an...@ch...> - 2010-02-02 15:44:25
|
Evgeny: > Did you setup a mime-type for? if no the content will be stored as > binary. Before commit > if you will try to store a binary content without mime you will have > exception, > because content will be stored as xml content. Yup...I figured this all out. However, there was no intrinsic mime type, since we were calling the xmldb:store from inside an XQuery which had read the data from an external source. Like I said, I was just surprised that the old behaviour changed is all. > What about XML content not in string but in base64 stream? I agree. That was problematic. > Think if you store XML content not from element() you can use mime -type > "text/xml" as 4th parameter. > But what mime must you setup, for many binary docs, for example when you > trying unzip somewhere into db? True on all counts. Though I wonder if it wouldn't be convenient to try and parse a string if a mime type is not specified, and if it parses, then store it as a text/xml document rather than as a binary document. Most binary types, such as base64, zip files and the like, would fail on the parse very quickly, so it would seem there wouldn't be much overhead in trying the parse first. Wouldn't be hard to implement (the old approach actually did this). Though again, I'm uncertain whether this "convenience" would be a good thing or not. -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |