AW: use of elements for property names in EXI4CSS

Hi Taki, all,

> In exi4css.xsd (schema for EXI4CSS [1]), currently enumerated values > are used for propertyType (currently at line 91).

To be precise, at the moment enumerated values are only used IF grammar strings are configured to be used ([1]). The enumerated values are part of an xsd:annotation.

> I wonder if we can instead use choice of elements in the following
> manner.
> ...

The proposal makes sense to me. The advantage I see is that all string characters are saved for the first appearance and 1 Byte is saved for each subsequent entry given that there is no need for signalizing a string table hit. Correct?
Do you see more advantages than these?

The reason to type the element property as string in the first place is to be aligned with the CSS Object Model (CSSOM) [2].

Another downside of the proposal I see is that some property elements might not be valid XML names. This is not an issue for EXI per se but we did have similar issues for EXI4JSON and decided to go with an escape mechanism (to allow for serializing to XML).

Let's discuss this topic further! It looks promising!

Thanks,

-- Daniel

[1] https://www.w3.org/XML/EXI/docs/extendedString/exi-extString.html#grammarString
[2] https://www.w3.org/TR/cssom-1/





________________________________
Von: Takuki Kamiya [tkamiya@us.fujitsu.com]
Gesendet: Dienstag, 17. Januar 2017 20:51
An: public-exi@w3.org
Betreff: use of elements for property names in EXI4CSS

Hi Daniel and all,

In exi4css.xsd (schema for EXI4CSS [1]), currently enumerated values are used for
propertyType (currently at line 91).

I wonder if we can instead use choice of elements in the following manner.

<xs:element name="style">
    <xs:complexType>
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
        <xs:element name="property">
          <xs:complexType>
            <xs:choice>
              <xs:element name="color">
                <xs:complexType/>
              </xs:element>
              <xs:element name="opacity">
                <xs:complexType/>
              </xs:element>
              ......
              <xs:element name="other">
                <xs:complexType>
                  <xs:sequence>
                    <xsd:any namespace="##targetNamespace" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>

That way, we can inform the pre-defined values but also be able to allow extension
through wildcard.

[1] https://github.com/EXIficient/exificient-for-css/blob/master/src/main/resources/exi4css.xsd

Takuki Kamiya
Fujitsu Laboratories of America

Received on Monday, 23 January 2017 10:14:11 UTC