OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Conditional Styles

Hi all,

My action item was to explain how conditional styles work. Consider a 
style which is supposed to look different depending on the position of 
the document, so that e.g. a complete document could be formatted as 
style 'mapped-style', but still render sensibly. E.g., the following 
would have inherited "Standard" attributes for normal text, but would 
use "footnote-style", "header-style" and "footer-style" for footnotes, 
headers and footers, respectively.

<style:style style:name="mapped-style"
  <style:map style:condition="footnote()" 
  <style:map style:condition="header()" 
  <style:map style:condition="footer()" 

In the text document, paragraphs look as follows:
Normal:  <text:p text:style-name="mapped-style">
Footnote: <text:p text:style-name="footnote-style" 
Header: <text:p text:style-name="header-style" 
Footer: <text:p text:style-name="footer-style" 

So in order to _render_ the document, one can _always_ access the style 
properties for the style in 'text:style-name'. Only if one is interested 
in (re-)evaluating the conditions, one needs to look at 
text:cond-style-name attribute to find the style which contains the map. 
Applications that don't understand would thus function without any 
problems, except that they would loose the style mapping (unless the 
relevant maps/attributes are preserved). Applications that do understand 
would have to look at text:cond-style-name to find the mapped style, and 
would only use text:style-name in case no text:cond-style-name attribute 
is present.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]