- From: Norman Walsh <ndw@nwalsh.com>
- Date: Thu, 09 Apr 2009 14:06:59 -0400
- To: public-xml-processing-model-comments@w3.org
- Message-ID: <m23achvgzg.fsf@nwalsh.com>
Florent Georges <fgeorges@fgeorges.org> writes:
>> "If the document root element is c:data or has a c:content-type
>> attribute that specifies a text content type or a media type that the
>> implementation recognizes, then the text descendants of this element are
>> considered the query."
>
> Unfortunately, I can't provide you with an answer, but I have
> another related question ;-)
>
> The above paragraph tells that the processor has to use the text
> value of the query document. I know XQuery is not well-formed XML,
> and that has been debated before. But can't we use content-type to
> enable one to use XML as the query? Something like:
>
> <!-- no @content-type, or text/plain -->
> <c:data>
> <result> {
> ...
> }
> </result>
> </c:data>
>
> could then be written as:
>
> <c:data content-type="application/xml">
> <result> {
> ...
> }
> </result>
> </c:data>
Not really. The input to the query processor *isn't* XML. We could provide
that functionality and add all the serialization parameters to the p:xquery
step, but I think it's cleaner to just use a p:escape-markup step yourself.
(Write your own ex:xquery-accepting-xml step if you do it a lot.)
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | Wisdom is only a comparative quality,
http://nwalsh.com/ | it will not bear a single
| definition.--Marquess of Halifax
Received on Thursday, 9 April 2009 18:07:40 UTC