Hey,
so I was just looking through some of out calc issues and found a
surprising validation error. According to odfvalidator the following
snippet is invalid.
<number:number-style style:name="N125P1" style:volatile="true">
<loext:text>-</loext:text>
<loext:fill-character> </loext:fill-character>
<number:number number:decimal-places="2"
number:min-integer-digits="1" number:grouping="true"/>
<number:text> SIT </number:text>
</number:number-style>
It took me some time to understand why it complains but at least to my
understanding that snippet is valid. odfvalidator seems to strip the loext
entries and leaves the - resulting in the following xml snippet:
<number:number-style style:name="N125P1" style:volatile="true">
-<number:number number:decimal-places="2"
number:min-integer-digits="1" number:grouping="true"/>
<number:text> SIT </number:text>
</number:number-style>
which is of course an invalid xml file.
Now looking at the ODF 1.2 spec about handling of foreign elements we find
the following paragraph:
*If a foreign element has a <text:h> or <text:p> ancestor element, and is a
child element of anelement for which the OpenDocument schema permits the
inclusion of character data, and if theOpenDocument schema permits the
inclusion of character data for all its ancestors up to the<text:p> or
<text:h> element ancestor element, then the element's content may
beinterpreted by conforming OpenDocument consumers, and the document itself
shall be validagainst the OpenDocument schema as if the foreign element's
start- and end-tags or its empty-element-tag are removed.For a foreign
element that occurs at another location, conforming consumers should not
interpretthe element's content, but may preserve its content.*
My interpretation of that paragraph that it is valid to include character
data in foreign elements and that they should be stripped similar to the
xml element. Is my reading of the spec wrong?
Regards,
Markus
Context
- ODF extension elements · Markus Mohrhard
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.