Next in thread → Next in month →

Re: [office] Question about style usage

From
Jos van den Oever <>
Date
2011-05-09T06:25:17+00:00
ID
Thread
Re: [office] Question about style usage
On Monday, May 09, 2011 07:56:34 AM  wrote:
> Hello,
> 
> my college Lassi came to the following problem when implementing import
> filters. Any comments on the subject?
> 
> Thorsten
> ________________________________________
> From: Nieminen Lassi.Ta (Nokia-SD/Helsinki)
> Sent: 06 May 2011 13:07
> To: Zachmann Thorsten (Nokia-SD/Munich)
> Subject: Problem statement
> 
> In odf (1.2) specification it is said that
> 
> The <style:graphic-properties> element is usable with the following
> elements: <style:default-style> 15.3 and <style:style> 15.2.
> 
> If such an element would be a child of eg.
> 
> <style:style style:name="T25" style:family="text">
>  <style:graphic-properties>...</...>
> </...>
> 
> How should that be interpreted? Or is it even allowed?
> One practical use case for this would be interoperability with
> gradient coloring of text which is supported by some
> other office formats.

That is simply not allowed. Below the relevant part of the Relax NG schema. It 
shows that a style from the text family may have only style:text-properties. 
Styles from the paragraph family may only have style:paragraph-properties and 
style:text-properties (in that order!).

        <define name="style-style-content">
                <choice>
                        <group>
                                <attribute name="style:family">
                                        <value>text</value>
                                </attribute>
                                <optional>
                                        <ref name="style-text-properties"/>
                                </optional>
                        </group>
                        <group>
                                <attribute name="style:family">
                                        <value>paragraph</value>
                                </attribute>
                                <optional>
                                        <ref name="style-paragraph-
properties"/>
                                </optional>
                                <optional>
                                        <ref name="style-text-properties"/>
                                </optional>
                        </group>
                        <group>
.....

Cheers,
Jos
Next in thread → Next in month →