We are trying to extend the REST API to return doctypes for some documents.

Part of the problem seems to be with the required function signature for GET: 
document-node()*. This obviously throws a coercion exception when the return 
value is ('<!DOCTYPE ... >', document{ <doc/> }). So I tried returning nesting 
the doctype under the document node: document { ('<!DOCTYPE ... >',<doc/>) } - 
this doesn't throw the exception, but it looks like another one gets caught 
somewhere, and the page renders a pretty error message:

"This page contains the following errors:

error on line 2 at column 1: Document is empty

Below is a rendering of the page up to the first error."

The rest of the page is empty. Any suggestions on a good way to do this?

Thanks,

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

Reply via email to