From: Jens Ø. P. <oe...@gm...> - 2011-03-17 13:41:17
|
On Mar 17, 2011, at 12:24 PM, Joe Wicentowski wrote: > Hi Jens, > >>> Yes, I noticed that I was having the problems with XML files being squashed flat again, but I simply create a backup using the Admin Client, that's all. This in itself - for me, using Mac OS 10.6.6 and trunk - removes all space between tags in XML files - it doesn't affect other files. In the database the files are neatly formatted and indented before backup. I take it that this does not happen to you when you make backups with the Admin Client …. >>> >>> I hope you can help - if with nothing else than you have the same problem! > > In fact, what I use to copy files out of eXist is a WebDAV client > (Transmit on the Mac, desktop mounting on Windows - there are other > clients listed in Dannes's recently revised WebDAV documentation in > trunk). WebDAV clients preserve the spaces as I set them in oXygen, > which is a pretty handy feature. I have done so with Finder before, but now I get the error when I try to copy to the local system: "The operation can’t be completed because an unexpected error occurred (error code -8084)." This is not a standard Mac OS error code (<http://support.apple.com/kb/HT2088?viewlocale=en_US>). It appears to be connected to the file system changes made in Snow Leopard (<http://discussions.apple.com/thread.jspa?threadID=2135546>). It also applies to Samba and NAS servers. Perhaps Dannes should delete the part relating to Finder in the documentation? I have tested with Cyberduck - and it works fine! I will use this method in the future. Thank you for showing me the way! (It only has the disadvantage that it litters all collections touched by it with .DS_Store!) > I haven't tested the backup utility much. For example, it would be > interesting to restore from backup - would your original whitespace be > restored too? (I recall there are various configuration settings > related to whitespace handling... would any of these affect the > backup/restore process?) If I interpret Wolfgang correctly, no, for internally all white-space text nodes are stripped from an XML document upon save. The settings you are thinking about would refer to whitespace _normalisation_, and what is done when a document is stored is more radical than normalisation - but I am just guessing, because I don't really know where these settings are made …. >> the backup utility will always output the XML as it is stored in >> eXist. No indenting is applied. Makes sense. It is for human consumption only. So indentation is performed on the fly both in the Admin Client and in oXygen. Makes sense as well. Certainly, any extra whitespace one adds get normalised when storing and opening again, so it looks that way. What I still don't get (but I am happy to remain ignorant here) is why when one opens a document copied over webdav in oXygen or in a text editor that is not XML-aware, there is indentation, whereas there is no indentation if the document has been backed up with the Admin Client …. Best, Jens >> I think we could provide a script which just dumps a certain >> collection to disk and indents the XML. I'll try to write one. > > Wolfgang - this sounds useful for folks like Jens who use the backup > utility. At the same time, is whitespace preservation one of the > goals of the backup utility? Is WebDAV perhaps the better route for > this use case? > > Thanks, > Joe |