Yeah, it's an ugly hack and only really works
in the context of CQ.  Forget I mentioned it.  :-)
You're better off adding the not-a-PI XML declaration
to the serialized XML outside of MarkLogic/XQuery as
needed.

On Aug 31, 2010, at 4:17 PM, Florent Georges wrote:

> Ron Hitchens wrote:
> 
>  Hi,
> 
>> The XML declaration is a processing instruction
> 
>  Really, the XML declaration is not a PI.  It looks like a PI,
> it smells like a PI, but the XML recommendation says it is not a
> PI, it is the XML declaration.  That is important because you can
> not expect to have it in XDM (for instance like a lot of people
> want to access CDATA sections in an XDM instance).
> 
>> let $prolog := '<?xml version="1.0" encoding="UTF-8"?>'
>> let $newXML := element result { ...
>> return ($prolog, $newXML)
> 
>  Well, if you ask you serializer to use the XML method, that
> should result to &_lt;...?&_gt;<result> ...  If you try it within
> CQ, you get this result when you ask for the "XML", but strangely
> enough you get '<?...?><result> ...' when asking for the "Text"
> (but this is neither a proper text nor xml method, by my reading
> of the serialization recommendation).
> 
>  Regards,
> 
> -- 
> Florent Georges
> http://fgeorges.org/
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

---
Ron Hitchens {mailto:[email protected]}   Ronsoft Technologies
     +44 7879 358 212 (voice)          http://www.ronsoft.com
     +1 707 924 3878 (fax)              Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown




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

Reply via email to