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 Wednesday, 25 November 2015 14:18:04 UTC