RE: ISSUE-110: What to do with xml:space being preserved in strict mode.

Hi Daniel,

Those significant whitespaces cannot be encoded using strict grammar 
(unless it is mixed content). In other words, there is no corresponding
representation in EXI with such settings (i.e. strict and element-only
content model).

Therefore, I think the consequence should be that Canonical EXI processors 
will fail to encode the document with that settings.

When the schema takes into account of xml:space attribute, then the
schema naturally should use mixed-content for its content type definition.

Takuki Kamiya
Fujitsu Laboratories of America


-----Original Message-----
From: Peintner, Daniel (ext) [mailto:daniel.peintner.ext@siemens.com] 
Sent: Wednesday, November 25, 2015 6:17 AM
To: Efficient XML Interchange Working Group
Subject: AW: ISSUE-110: What to do with xml:space being preserved in strict mode.

All,

To make the issue more clear I would like to make a simple example.

Let's suppose the following XML schema.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
    <xs:import namespace='http://www.w3.org/XML/1998/namespace' schemaLocation='http://www.w3.org/2001/xml.xsd'/>
    <xs:element name='el1' >
        <xs:complexType>
            <xs:sequence>
                <xs:element name="t" type='xs:string' minOccurs='0'/>
            </xs:sequence>
            <xs:attribute ref='xml:space'/>
        </xs:complexType>
    </xs:element>
</xs:schema>

A valid instance might look like this

<el1 xml:space="preserve">   <t>foo</t></el1>

For EXI there is one issue in strict mode when enforced to fulfill the requirement for xml:space="preserve". That said, the empty characters "   " are to be represented but EXI does not have any way to do so in EXI strict.

The question is what is the "correct" way to deal with such an issue
* fail to encode?
* skip these empty characters? (conflicts with the xml:space requirement)
* other?

Any idea, thoughts?

I tend to say that an EXI encoder should fail because it cannot represent the information it was asked to represent.

Thanks,

-- Daniel


P.S. An option could have been to handle xml:space attribute specifically in XML schema handling (EXI grammars) but it would cause lots of issues given that xml:space applies to nested elements also.




________________________________
Von: Efficient XML Interchange Working Group Issue Tracker [sysbot+tracker@w3.org]
Gesendet: Dienstag, 17. November 2015 17:20
An: public-exi@w3.org
Betreff: ISSUE-110: What to do with xml:space being preserved in strict mode.

ISSUE-110: What to do with xml:space being preserved in strict mode.

https://www.w3.org/2005/06/tracker/exi/issues/110

Raised by:
On product:

Received on Monday, 30 November 2015 22:18:51 UTC