Hi Roy,
if documents are parsed and stored as XML, they will be normalized and, in this process, some meta information, such as the doctype declaration, is lost. The same applies e.g. to text declarations (<?xml ...?> or entities.
With XQuery and other interfaces, it is possible to serialize documents with doctype declarations [1]. Unfortunately, there is no way to do so with WebDAV (or at least none of which I have heard so far) as WebDAV was designed to completely work out of the box.
There is a “dirty” trick, however: if you precede your XML documents with a whitespace, they will be stored as "raw" files in the database. This way, you won't be able to apply XQuery etc. to that documents, as BaseX builds no internal index representations for those resources, but you'll get a 100% lossless version back.
Hope that helps, Christian
[1] http://docs.basex.org/wiki/Serialization ___________________________
On Fri, Nov 2, 2012 at 7:39 PM, Roy MacLean Roy.MacLean@dovetailsystems.com wrote:
Hi, How (if at all) can I preserve the DOCTYPE declarations in the XML documents loaded into a database. I've read the documentation pages on Parsers and Catalogs, but I can't see what allows me to do this.
My editor accesses the files via WebDAV ok, but it needs the DOCTYPE for further processing.
Thanks
Roy MacLean| Technical Writer | T: +44 20 7562 7777 | M: +44 7956 474 911 | Dovetail | 51 Moorgate, London, EC2R 6BH, UK |
The information in this email is for the sole use of the intended recipients(s). It may be confidential and/or legally privileged. Any review, disclosure, copying, distribution, retention, or any other use by others is prohibited and may be unlawful. If you are not the intended recipient, please contact the sender and delete all copies. We reserve the right to monitor email content for the purposes of ensuring compliance with legal requirements and company policies and your sending to, or receiving from, us of any email constitutes your agreement to these terms.
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk