Author mode: working with -oxy-placeholder-content
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 48
- Joined: Wed Oct 22, 2014 4:11 pm
Author mode: working with -oxy-placeholder-content
Post by friedemann_bach »
Dear Forum,
I have an issue when trying to use "-oxy-placeholder-content".
Using TEI, I want to identify later and earlier stages of a historical text, by parallel markup. Here is an example:
Which says that "lived" appears in two other sources as "liveth" and "livd" respectively.
This is the CSS used in the Author mode:
It results in:
lived] w2 liveth w3 livd
Which fits quite nice to the purpose.
Now, imagine another source in which the word "lived" does not appear at all. It had to be marked up like that:
And I want it to be rendered like that:
lived] w2 liveth w3 livd w4 ∅
I tried adding this line to my CSS:
text body app rdg { -oxy-placeholder-content:attr(wit)' ∅ '; }
But it does not seem to work when :before { content:'...' } is in used on the same class.
Furthermore, when omitting the rdg:before styles, it will display only the first expression, attr(wit), but not the following string, ' ∅ '.
Is there a fix or a workaround to achieve this? I would appreciate this very much.
I have an issue when trying to use "-oxy-placeholder-content".
Using TEI, I want to identify later and earlier stages of a historical text, by parallel markup. Here is an example:
Code: Select all
<app>
<lem wit="#w1">lived</lem>
<rdg wit="#w2">liveth</rdg>
<rdg wit="#w3">livd</rdg>
</app>
This is the CSS used in the Author mode:
Code: Select all
app lem:after { content:']'; }
app rdg:before { content:' 'oxy_replace(attr(wit),'#','')': '; font-style:italic; }
lived] w2 liveth w3 livd
Which fits quite nice to the purpose.
Now, imagine another source in which the word "lived" does not appear at all. It had to be marked up like that:
Code: Select all
<app>
<lem wit="#w1">lived</lem>
<rdg wit="#w2">liveth</rdg>
<rdg wit="#w3">livd</rdg>
<rdg wit="#w4"/>
</app>
lived] w2 liveth w3 livd w4 ∅
I tried adding this line to my CSS:
text body app rdg { -oxy-placeholder-content:attr(wit)' ∅ '; }
But it does not seem to work when :before { content:'...' } is in used on the same class.
Furthermore, when omitting the rdg:before styles, it will display only the first expression, attr(wit), but not the following string, ' ∅ '.
Is there a fix or a workaround to achieve this? I would appreciate this very much.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Author mode: working with -oxy-placeholder-content
Post by alex_jitianu »
Hello,
Best regards,
Alex
This is actually the intended behavior. If a :before exists we don't present the placeholder anymore. A solution to your problem is to use the :empty pseudo class instead:But it does not seem to work when :before { content:'...' } is in used on the same class.
Code: Select all
app rdg:before { content:' 'oxy_replace(attr(wit),'#','')': '; font-style:italic; }
app rdg:empty:before { content:attr(wit)' ∅ '; }
Yes. It's probably something we've missed but an workaround is to use the oxy_concat() CSS function:Furthermore, when omitting the rdg:before styles, it will display only the first expression, attr(wit), but not the following string, ' ∅ '.
Code: Select all
-oxy-placeholder-content:oxy_concat(attr(wit), ' ∅ ');
Alex
-
- Posts: 48
- Joined: Wed Oct 22, 2014 4:11 pm
Re: Author mode: working with -oxy-placeholder-content
Post by friedemann_bach »
Thanks a lot - I was not aware of the :empty pseudo class. This works great!
The concat() solution is a nice workaround for this situation, too.
The concat() solution is a nice workaround for this situation, too.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service