Re: Agenda for XML Core WG telcon of 2006 August 23

On Mon, Aug 21, 2006 at 10:17:53AM -0400, Grosso, Paul wrote:
> DV reports that there are a few changes in the XInlude 
> errata that could benefit from a test suite. 
> 
> ACTION: DV to propose new XInclude tests.

 I didn't fully fullfill my ACTION, but I think I identified the 3 errata
who can really affect the processing: PEX1, PEX6 and PEX11, and suggest 
test cases which could be added. I didn't really tried to push new tests
in W3C CVS (it's a bit messy, is http://dev.w3.org/cvsweb/XInclude-Test-Suite/
really where this should live ?), so the action is not complete. I'm also
afraid libxml2 currently would fail those tests, so I also need to fix my
code. But here is the list and suggested test to be added:

* http://www.w3.org/XML/2005/01/proposed-xinclude-errata#PEX1

Adding a new paragraph between paragraph 3 and 4 of section 3.2:
    The content of xi:fallback elements are ignored unless a resource
    error occurs while processing the surrounding xi:include element. In
    particular, apparent fatal errors caused by the presence, absence,
    or content of elements and attributes inside the xi:fallback element
    must not be reported in xi:fallback elements that are ignored.

I went though all the tests in
  http://dev.w3.org/cvsweb/XInclude-Test-Suite/XInclude-Test-Suite/
None covers this case.

Something like the following test should be added:

<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
   <!-- Test that no fatal error is generated for a fallback element
        content that is not activated.-->
   <xinclude:include href="./ents/something.xml">
        <xinclude:fallback>
	    <xinclude:fallback>
	    </xinclude:fallback>
        </xinclude:fallback>
   </xinclude:include>
</x>

Libxml2 actually fails that test at the moment.

* http://www.w3.org/XML/2005/01/proposed-xinclude-errata#PEX6

  Change handling of BOM on parse='text'
  We will add the following clarification that applies
  to all encodings:

    When the first character is interpreted as a BOM,
    it should be discarded.  It is interpreted as a
    BOM in UTF-8, UTF-16, and UTF-32 encodings; it is
    not interpreted as a BOM in the UTF-16LE, UTF-16BE,
    UTF-32LE, and UTF-32BE encodings.

Again I didn't see any test which would suit that one.

We need to add one test like

<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
   <!-- Test that a BOM in UTF16 is not added to the resulting document -->
   <xinclude:include href="../ents/utf16lewithbom" parse="text"
                     encoding="UTF-16">
   </xinclude:include>
</x>

and another one 

<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
   <!-- Test that a BOM in UTF16 is not added to the resulting document -->
   <xinclude:include href="../ents/utf16lewithbom" parse="text"
                     encoding="UTF-16LE">
   </xinclude:include>
</x>

And check that the resulting document does not include xFEFF while the second
does.
I'm relatively confident that libxml2 would fail the second one, consuming the
BOM in case of encoding="UTF-16LE" ... I need to find a way to produce the
utf16lewithbom document maybe simply an UTF16LE with BOM existing XML document
will be the simplest to find and check.

* http://www.w3.org/XML/2005/01/proposed-xinclude-errata#PEX11

  character checking on accept attribute values.

  Therefore, we want
  to be more restrictive than required by 2616. So, we plan to change:

    Values containing characters outside the range #x20 through #x7E are
    disallowed in HTTP headers, and must be flagged as fatal errors.

  instead to be worded as follows:

    Values containing characters outside the range #x20 through #x7E must
    be flagged as fatal errors.

So we need to add a test with an accept attribute holding a wrong value:

<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
   <!-- Test that a wrong accept attribute generate a fatal error -->
   <xinclude:include href="../ents/something.xml"
                     accept="&#xA">
   </xinclude:include>
</x>

Libxml2 does not implement accept header, it doesn't even look at it, so
I'm sure I fail this at the moment.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

Received on Wednesday, 23 August 2006 13:47:58 UTC