<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"> content: oxy_xpath("parent::frame/@id");</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: 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>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"> frame > title:before{</font>
<br><font size=2 face="sans-serif"> content:
"Frame " counter(lesson_count) "." counter(frame_count)
": " oxy_label(text, oxy_xpath("parent::frame/@id"),
font-size, .5em, color, green);</font>
<br><font size=2 face="sans-serif"> counter-increment:
frame_count;</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif"><br>
Regards,<br>
<br>
Patrik<br>
<br>
------------------------------------------------------------------<br>
Systemarchitektur & 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:
</font><font size=1 face="sans-serif">"G. Ken Holman"
<gkholman@CraneSoftwrights.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:
</font><font size=1 face="sans-serif">oXygen User Maillist
<oXygen-user@oxygenxml.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:
</font><font size=1 face="sans-serif">17.10.2013 18:38</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:
</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:
</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>
display:block;<br>
counter-reset:pane_count;<br>
}<br>
frame > title{<br>
font-size: 2.0em;<br>
border-bottom: 1px solid #004477;<br>
}<br>
frame > title:before{<br>
content: "Frame " counter(lesson_count) "."
counter(frame_count) ": ";<br>
counter-increment: frame_count;<br>
}<br>
frame > title:after {<br>
font-size:.5em;<br>
color:green;<br>
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. 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. I tried the following without success:<br>
<br>
frame > title:before{<br>
content: "Frame " counter(lesson_count) "."
counter(frame_count) ": ";<br>
/*content: "Frame " counter(module_count) "."
<br>
counter(lesson_count) "." counter(frame_count) ": ";*/<br>
counter-increment: frame_count;<br>
}<br>
frame > title:before {<br>
font-size:.5em;<br>
color:green;<br>
content: "XXX";<br>
}<br>
<br>
... because only the second selector was selected. I'll fix the <br>
"XXX" 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 & 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. </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
</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: </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 & 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>