<font size=2 face="sans-serif">Hi Ken,</font>
<br>
<br><font size=2 face="sans-serif">for your first topic you can write</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; content: oxy_xpath(&quot;parent::frame/@id&quot;);</font>
<br>
<br><font size=2 face="sans-serif">(I also recommend to have a look on
the page </font><a href="http://www.oxygenxml.com/doc/ug-editor/concepts/dg-oXygen-css-extensions.html"><font size=2 face="sans-serif">http://www.oxygenxml.com/doc/ug-editor/concepts/dg-oXygen-css-extensions.html</font></a><font size=2 face="sans-serif">
- there are lots of nice extensions you might not even think of.)</font>
<br>
<br><font size=2 face="sans-serif">For the second topic: &nbsp;Both selectors
are executed, but the content-command of the second one overwrites the
one of the first selector (counter-increment of the first one is still
executed but has no effect when the counter is not displayed.)</font>
<br>
<br><font size=2 face="sans-serif">Since the title is most likely the first
element in frame it might be an option to use frame:before instead of one
of the frame&gt;title:before. This way you can have two different contents
with different styles right before the actual title.</font>
<br>
<br><font size=2 face="sans-serif">Another way might be to join both selectors
and use the custom function oxy_label to use different styles. It would
look like this (not testes):</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; frame &gt; title:before{</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; content:
&quot;Frame &quot; counter(lesson_count) &quot;.&quot; counter(frame_count)
&quot;: &quot; oxy_label(text, oxy_xpath(&quot;parent::frame/@id&quot;),
font-size, .5em, color, green);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; counter-increment:
frame_count;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; }</font>
<br>
<br><font size=2 face="sans-serif"><br>
Regards,<br>
<br>
Patrik<br>
<br>
------------------------------------------------------------------<br>
Systemarchitektur &amp; IT-Projekte<br>
Tel: +49 40 33449-1142<br>
Fax: +49 40 33449-1400<br>
E-Mail: patrik.stellmann@gdv-dl.de</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">&quot;G. Ken Holman&quot;
&lt;gkholman@CraneSoftwrights.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">oXygen User Maillist
&lt;oXygen-user@oxygenxml.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">17.10.2013 18:38</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">[oXygen-user]
Addressing content from CSS in Author Mode</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Gesendet von: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">oxygen-user-bounces@oxygenxml.com</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hello, all!<br>
<br>
I hope some enthusiastic oXygen user can point me to how in CSS I can <br>
obtain a value from an element other than the element matching the <br>
CSS selector.<br>
<br>
This is a fragment of my CSS:<br>
<br>
<br>
frame {<br>
 &nbsp; &nbsp; display:block;<br>
 &nbsp; &nbsp; counter-reset:pane_count;<br>
}<br>
frame &gt; title{<br>
 &nbsp; &nbsp; font-size: 2.0em;<br>
 &nbsp; &nbsp; border-bottom: 1px solid #004477;<br>
}<br>
frame &gt; title:before{<br>
 &nbsp; &nbsp; content: &quot;Frame &quot; counter(lesson_count) &quot;.&quot;
counter(frame_count) &quot;: &quot;;<br>
 &nbsp; &nbsp; counter-increment: frame_count;<br>
}<br>
frame &gt; title:after {<br>
 &nbsp; font-size:.5em;<br>
 &nbsp; color:green;<br>
 &nbsp; content: attr(id);<br>
}<br>
<br>
<br>
At the very end I am exposing the @id, but my selector is in frame's <br>
title and the attribute I need to expose is in the parent frame <br>
element. &nbsp;I couldn't say attr(../@id) and I couldn't find a way of
<br>
storing attr(id) in a variable in the frame's selector.<br>
<br>
A second problem is to expose different content with different <br>
appearances using one selector. &nbsp;I tried the following without success:<br>
<br>
frame &gt; title:before{<br>
 &nbsp; &nbsp; content: &quot;Frame &quot; counter(lesson_count) &quot;.&quot;
counter(frame_count) &quot;: &quot;;<br>
 &nbsp; &nbsp; /*content: &quot;Frame &quot; counter(module_count) &quot;.&quot;
<br>
counter(lesson_count) &quot;.&quot; counter(frame_count) &quot;: &quot;;*/<br>
 &nbsp; &nbsp; counter-increment: frame_count;<br>
}<br>
frame &gt; title:before {<br>
 &nbsp; font-size:.5em;<br>
 &nbsp; color:green;<br>
 &nbsp; content: &quot;XXX&quot;;<br>
}<br>
<br>
... because only the second selector was selected. &nbsp;I'll fix the <br>
&quot;XXX&quot; when I fix the attr() problem stated earlier.<br>
<br>
Any guidance on either of these two topics would be greatly appreciated!<br>
<br>
. . . . . . . . Ken<br>
<br>
--<br>
Public XSLT, XSL-FO, UBL &amp; code list classes: Melbourne, AU May 2014
|<br>
Contact us for world-wide XML consulting and instructor-led training |<br>
Free 5-hour lecture: </font></tt><a href=http://www.cranesoftwrights.com/links/udemy.htm><tt><font size=2>http://www.CraneSoftwrights.com/links/udemy.htm</font></tt></a><tt><font size=2>
|<br>
Crane Softwrights Ltd. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font></tt><a href=http://www.cranesoftwrights.com/m/><tt><font size=2>http://www.CraneSoftwrights.com/m/</font></tt></a><tt><font size=2>
|<br>
G. Ken Holman &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</font></tt><a href=mailto:gkholman@CraneSoftwrights.com><tt><font size=2>mailto:gkholman@CraneSoftwrights.com</font></tt></a><tt><font size=2>
|<br>
Google+ profile: </font></tt><a href=https://plus.google.com/116832879756988317389/about><tt><font size=2>https://plus.google.com/116832879756988317389/about</font></tt></a><tt><font size=2>
|<br>
Legal business disclaimers: &nbsp; &nbsp;</font></tt><a href=http://www.cranesoftwrights.com/legal><tt><font size=2>http://www.CraneSoftwrights.com/legal</font></tt></a><tt><font size=2>
|<br>
<br>
_______________________________________________<br>
oXygen-user mailing list<br>
oXygen-user@oxygenxml.com<br>
</font></tt><a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user"><tt><font size=2>http://www.oxygenxml.com/mailman/listinfo/oxygen-user</font></tt></a><tt><font size=2><br>
</font></tt>
<br><p></p><p><strong>GDV Dienstleistungs-GmbH &amp; Co. KG</strong><br><span style="line-height: 1.22;">Glockengießerwall 1<br></span><span style="line-height: 1.22;">D-20095 Hamburg<br></span><span style="line-height: 1.22;">www.gdv-dl.de</span></p><p><span style="line-height: 1.22;">Sitz und Registergericht: Hamburg<br></span><span style="line-height: 1.22;">HRA 93 894<br></span><span style="line-height: 1.22;">USt.-IdNr : DE 205183123</span></p><p><span style="line-height: 1.22;">Komplementärin:<br></span><span style="line-height: 1.22;">GDV Beteiligungsgesellschaft mbH<br></span><span style="line-height: 1.22;">Sitz und Registergericht: Hamburg<br></span><span style="line-height: 1.22;">HRB 71 153</span></p><p><span style="line-height: 1.22;">Geschäftsführer:<br></span><span style="line-height: 1.22;">Volker Sonnenburg<br></span><span style="line-height: 1.22;">Heiko Beermann</span></p><p><span style="line-height: 1.22;">------------------------------------------------------------------<br></span><span style="line-height: 1.22;">Diese E-Mail und alle Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.</span></p><p><span style="line-height: 1.22;">This e-mail and any attached files may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distributionof the material in this e-mail is strictly forbidden.</span></p><p></p>