[Bug 29785] [FO31] 17.5.4 fn:xml-to-json

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29785

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #6 from Michael Kay <mike@saxonica.com> ---
I recommend that we change the text 

<old>
The node supplied as $input must be one of the following: [err:FOJS0006]

1. An element node whose name matches the name of a global element declaration
in the schema given in C.2 Schema for the result of fn:json-to-xml and whose
type annotation matches the type of that element declaration (indicating that
the element has been validated against this schema).

2. An element node whose name matches the name of a global element declaration
in the schema given in C.2 Schema for the result of fn:json-to-xml, whose type
annotation is xs:untyped, and whose content after stripping all attributes (at
any depth) in namespaces other than http://www.w3.org/2005/xpath-functions is
such that validation against the schema given in C.2 Schema for the result of
fn:json-to-xml would succeed.

Note:
The reason attributes in alien namespaces are stripped is to avoid the need for
a non-schema-aware processor to take into account the effect of attributes such
as xsi:type and xsi:nil that would affect the outcome of schema validation.

3. A document node having exactly one element child and no text node children,
where the element child satisfies one of the two conditions above.
</old>

to read:

The node supplied as $input must be one of the following: [err:FOJS0006]

1. An element node whose name matches the name of a global element declaration
in the schema given in [C.2 Schema for the result of fn:json-to-xml] ("the
schema") and that is valid as defined below:

1a. If the type annotation of the element matches the type of the relevant
element declaration in the schema (indicating that the element has been
validated against the schema), then the element is considered valid.

1b. Otherwise, the processor MAY attempt to validate the element against the
schema, in which case it is treated as valid if and only if validation
succeeds.

1c. Otherwise, the processor MUST ensure that the content of the element, after
stripping all attributes (at any depth) in namespaces other than
http://www.w3.org/2005/xpath-functions, is such that validation against the
schema  would succeed.

Note (within 1c):

The process described here is not precisely equivalent to schema validation.
For example, schema validation will fail if there is an invalid xsi:type or
xsi:nil attribute, whereas this process will ignore such attributes.

2.  A document node having exactly one element child and no text node children,
where the element child is valid as defined above.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 6 September 2016 21:13:34 UTC