- From: <nobody@w3.org>
- Date: Wed, 05 Aug 2015 15:39:01 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29024
--- Comment #1 from Josh Spiegel <josh.spiegel@oracle.com> ---
It also needs to clarify what the required type is when the schema type is
method-type. The required type should not be method-type since this would
require importing and casting. Here is my suggestion:
"For the union types method-type or json-node-output-method-type, the required
type is a union of xs:string and xs:QName. If the value is an instance of
xs:string, it is treated as a QName in no namespace with a local name equal to
the value. "
Then the error behavior would then be defined as described in the following
note:
"If the supplied value is of the wrong type for the particular parameter, for
example if the value of indent is a string rather than a boolean, then as
defined by the ·option parameter conventions·, a type error [err:XPTY0004] is
raised. If the value is of the correct type, but does not satisfy the rules for
that parameter defined in [XSLT and XQuery Serialization 3.1], then a dynamic
error [err:SEPM0016]is raised."
For example, the following queries would not raise an error:
fn:serialize(<e/>, map { "method" : "xml" })
fn:serialize(<e/>, map { "method" : QName("", "xml") })
fn:serialize(<e/>, map { "method" : ser:method-type("xml") })
fn:serialize(<e/>, map { "method" : xs:untypedAtomic("xml") })
fn:serialize(<e/>, map { "method" : <e>xml</e> })
fn:serialize(<e/>, map { "method" : validate type xs:QName { <e>xml</e> }})
The following queries would raise XPTY0004:
fn:serialize(<e/>, map { "method" : 1 })
fn:serialize(<e/>, map { "method" : () })
fn:serialize(<e/>, map { "method" : ("xml","json") })
The following queries would raise SEPM0016:
fn:serialize(<e/>, map { "method" : "foo" })
fn:serialize(<e/>, map { "method" : QName("", "foo") })
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 5 August 2015 15:39:08 UTC