Wolfgang Meier | 7 Jul 2012 19:27
Gravatar

Change: declaration of serialization parameters

I just committed a small change to align serialization parameters with
the XQuery 3.0 spec: contrary to XQuery 1.0, the 3.0 version of the
language defines a standard way for setting serialization parameters.
The old, non-standard approach in eXist-db was to use a single option
with all parameters in the value:

declare option exist:serialize "method=json media-type=application/json";

The standard way of doing this in XQuery 3.0 would be:

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "json";
declare option output:media-type "application/json";

The old approach is still supported for backwards compatibility! The
parameter names remain the same as well.

Wolfgang

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Dannes Wessels | 7 Jul 2012 20:17

Re: Change: declaration of serialization parameters

On Saturday, 7 July 2012 at 19:27 , Wolfgang Meier wrote:
declare option exist:serialize "method=json media-type=application/json";

The standard way of doing this in XQuery 3.0 would be:

declare option output:method "json";
declare option output:media-type "application/json";
having this standardized is nice….. and it looks well too !

Maybe we should post (as in: remember the community) the details to this for html5 and xhtml as well…..

cheers

Dannes

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

Gmane