RE: DR 14-0010 — SML: Attribute textRotation

John Haug johnhaug at
Wed Feb 11 20:28:23 CET 2015

If we do add schema, since the allowed values (already in the standard) are 0-180 and we’re only adding mention of 255, should the schema instead add something like this?

<xsd:simpleType name="ST_TextRotation">
      <xsd:restriction base="xsd:nonNegativeInteger">
        <xsd:maxInclusive value="180"/>
      <xsd:restriction base="xsd:Integer">
        <xsd:minInclusive value="255"/>
        <xsd:maxInclusive value="255"/>

There’s likely a better way to write this…  If we add 0-360 as valid values, the prose needs to change and it adds new behavior for implementations.  Not necessarily bad, but it’s new.  How do other implementations handle 181-360?


From: eb2mmrt at [mailto:eb2mmrt at] On Behalf Of MURATA Makoto
Sent: Saturday, February 7, 2015 2:56 AM
To: e-SC34-WG4 at
Subject: Re: DR 14-0010 — SML: Attribute textRotation

Re: Issue 1/2  Ideally, every condition in prose should be captured by schemas.
Here is my prposal.


    <xsd:attribute name="textRotation" type="xsd:unsignedInt" use="optional"/>

in sml.xsd by

    <xsd:attribute name="textRotation" type="ST_TextRotation" use="optional"/>

and add

  <xsd:simpleType name="ST_TextRotation">
    <xsd:restriction base="xsd:unsignedInt">
      <xsd:minInclusive value="0"/>
      <xsd:maxExclusive value="360"/>


  attribute textRotation { xsd:unsignedInt }?,

in sml.rnc by

  attribute textRotation { sml_ST_TextRotation }?,

and add

sml_ST_TextRotation =
  xsd:unsignedInt { minInclusive = "0" maxExclusive = "360" }


2015-01-14 9:26 GMT+09:00 Chris Rae <Chris.Rae at<mailto:Chris.Rae at>>:
DR is here:

I've done a bit of investigation into this DR and it seems to definitely represent an omission either from the standard or from Microsoft's implementer notes. The DR mentions several things:

1. the actual schema has unsignedInt while the description clearly imposes limits;
2. an unsignedInt is clearly not restrictive enough in this respect (0 < x 359 should be sufficient);
3. the value of 255 seems to be specifying different, undefined behaviour (ideally this should probably be controlled by a separate attribute). Excel at least seems to treat values > 180 as negative.

Issue 1/2: I don't feel strongly on this, although we do have many others cases where ranges are specified in prose rather than schema. Rather than open that can of worms, I propose not adding this limit to schema.

Issue 3: I've tested this in Microsoft Office, LibreOffice, Open Office and Google Docs. Google Docs appears not to support text rotation at all, but the other three applications do indeed all treat the value 255 as special, and meaning text written downwards. I therefore propose the attached changes to the standard to address this.

On Excel's treatment of values >180, it does appear to be slightly odd but I don't think this is deliberate and there's no way to recreate it in the user interface. As the standard doesn't dictate what to do with invalid files, I don't think we need to document this case (and, if we do, I think it should be in Excel's implementer notes).



Praying for the victims of the Japan Tohoku earthquake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the sc34wg4 mailing list