Hi Geert,

I'm sorry that was so vague. Here's what I meant: I'm working in the context of 
a web application, written in XQuery and running on a MarkLogic HTTP 
application server. In that context, the HTTP requests and responses are 
handled by a query (a main module). If I use XQuery 1.0-ml and the ML output 
options, like so:

xquery version "1.0-ml";
declare option xdmp:output "method = html";
<html><body><hr/></body></html>

then the output (that is, the body of the HTTP response from the ML HTTP 
server) is serialized as HTML. Note the unclosed <hr> element:

<html><body><hr></body></html>

But if I use XQuery 3.0 like so:

xquery version "3.0";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";;
declare option output:method "html";
<html><body><hr/></body></html>

then the response from the ML HTTP server is serialized as XML:

<html><body><hr/></body></html>

That's what surprised me and led me ask whether or not ML supports the XQuery 
3.0 serialization options.

Thanks,
Greg


On Jan 6, 2014, at 11:11 AM, Geert Josten wrote:

> Hi Greg,
> 
> Can you elaborate a bit on what you mean 'I get XML'? Do you mean
> content-type? XHTML? Or are you getting your data returned as-is, instead
> of transformed to HTML?
> 
> Cheers,
> Geert
> 
>> -----Oorspronkelijk bericht-----
>> Van: [email protected] [mailto:general-
>> [email protected]] Namens Murray, Gregory
>> Verzonden: donderdag 2 januari 2014 22:44
>> Aan: MarkLogic Developer Discussion
>> Onderwerp: [MarkLogic Dev General] XQuery 3.0 serialization options
>> 
>> I'm aware of the ML-specific serialization options, but for code
>> portability/sharing I'm interested in the XQuery 3.0 serialization
> options. It
>> appears that ML doesn't support them. I've got ML 6.0-3.2, and when I
> try
>> the following, which is taken from an example in the spec at
>> http://www.w3.org/TR/xquery-30/#id-serialization
>> 
>> xquery version "3.0";
>> declare namespace output = "http://www.w3.org/2010/xslt-xquery-
>> serialization";
>> declare option output:method "html";
>> ...
>> 
>> I get XML, which is the default. Am I correct that those options are not
>> supported? Perhaps they're added in 7.0?
>> 
>> Thanks,
>> Greg
>> 
>> PS. I'm having trouble finding ML documentation on what features of
> XQuery
>> 3.0 are supported and which aren't. Please let me know if I'm
> overlooking
>> something in one of the guides.
>> 
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

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

Reply via email to