Toggle display/edit of inline footnotes
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 16
- Joined: Tue Nov 13, 2007 6:02 pm
Toggle display/edit of inline footnotes
I've been tasked with an implementation challenge and I'd appreciate any suggestions. In a future specification of our content model, footnotes will be placed inline, at the point of reference, within the text. The footnotes in this code is the lds:footnote elements (there are two):
In Author, by default I need to suppress display of these footnotes to allow for normal proofing/editing of the main body of content. I also need to provide users a way to toggle display of the footnotes so they can be individually edited. Ideally, this toggle would be accomplished with some sort of button or link icon, rather than toggling activation of alternate CSS using the Styles menu. This solution would be needed in both Web Author and standalone XML Editor applications.
Interestingly, the footnotes are in a paragraph (html5 p element), and each footnote itself contains one or more paragraphs (bound to a proprietary namespace implementation).
Any suggestions for the best way to handle this? I don't need actual code, but rather some direction as to what part of the Author API might be best to extend.
Thanks,
Jeff
Code: Select all
<test>
<p>Another paragraph</p>
<p id="89e3951b-6739-4bab-a0d7-61930eab9ec7">Today I feel compelled to discuss with you a matter of great importance. Some weeks ago, I released a statement regarding a course correction for the name of the Church.<lds:footnote lds:id="9ae0ed0a-1ef1-440c-9924-21cba0017aa6"><lds:p lds:id="236a3dd9-1766-4a1b-9969-78b63d1c005a">“The Lord has impressed upon my mind the importance of the name He has revealed for His Church, even The Church of Jesus Christ of Latter-day Saints. We have work before us to bring ourselves in harmony with His will. In recent weeks, various Church leaders and departments have initiated the necessary steps to do so. Additional information about this important matter will be made available in the coming months” (Russell M. Nelson, in “<lds:a href="https://www.mormonnewsroom.org/article/name-of-the-church">The Name of the Church</lds:a>” [official statement, Aug. 16, 2018], mormonnewsroom.org).</lds:p></lds:footnote> I did this because the Lord impressed upon my mind the importance of the name He decreed for His Church, even The Church of Jesus Christ of Latter-day Saints.<lds:footnote lds:id="b1067924-aa2f-4680-b9bb-ed62ce70100b"><lds:p lds:id="945ca76c-8513-45bc-8274-ba7b5d2e3d5c">Preceding Presidents of the Church have made similar requests. For example, President George Albert Smith said: “Don’t let the Lord down by calling this the Mormon Church. He didn’t call it the Mormon Church” (in Conference Report, Apr. 1948, 160).</lds:p></lds:footnote></p>
<p>Another paragraph</p>
</test>
Interestingly, the footnotes are in a paragraph (html5 p element), and each footnote itself contains one or more paragraphs (bound to a proprietary namespace implementation).
Any suggestions for the best way to handle this? I don't need actual code, but rather some direction as to what part of the Author API might be best to extend.
Thanks,
Jeff
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Toggle display/edit of inline footnotes
Hi Jeff,
There is a demo here with a TEI document containing footnotes:
https://www.oxygenxml.com/oxygen-xml-we ... =Anonymous
The CSS for it is available here:
https://www.oxygenxml.com/oxygen-xml-we ... ss/all.css
You can open it in Oxygen using its "File->Open URL" dialog and then navigate in all the imported CSSs and see how that works.
Regards,
Radu
There is a demo here with a TEI document containing footnotes:
https://www.oxygenxml.com/oxygen-xml-we ... =Anonymous
The CSS for it is available here:
https://www.oxygenxml.com/oxygen-xml-we ... ss/all.css
You can open it in Oxygen using its "File->Open URL" dialog and then navigate in all the imported CSSs and see how that works.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 16
- Joined: Tue Nov 13, 2007 6:02 pm
Re: Toggle display/edit of inline footnotes
Quick follow-up question: We've never seen implementation of the :before selector receiving parameterization or constraint being passed to it, as you seem to be doing in the css for this demo (the "(101)" on :before):
Is this implementation proprietary to Oxygen, and if so, do you have documentation?
Code: Select all
note:before(101) {
...
...
}
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Toggle display/edit of inline footnotes
Hi,
At some point those E:before(n) and E:after(n) selectors were defined in a working draft of the CSS level 3 specification. But they were removed from the draft. So Oxygen supports them, they are very useful and we'll continue to support them. But this is why we do not have much documentation about them, we relied on the CSS3 specification which changed and removed the description and examples for them. I will add an internal issue to document them and provide a few usage examples. In the meantime if you have any particular questions about using them we can help.
Regards,
Radu
At some point those E:before(n) and E:after(n) selectors were defined in a working draft of the CSS level 3 specification. But they were removed from the draft. So Oxygen supports them, they are very useful and we'll continue to support them. But this is why we do not have much documentation about them, we relied on the CSS3 specification which changed and removed the description and examples for them. I will add an internal issue to document them and provide a few usage examples. In the meantime if you have any particular questions about using them we can help.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Toggle display/edit of inline footnotes
Hi Jeff,
Applying this CSS:
on this XML document:
yields in the Author visual editing mode:
abccontentde
Regards,
Radu
Applying this CSS:
Code: Select all
tag:before(2){
content:"a";
}
/* tag:before(1) is equivalent to tag:before */
tag:before(1){
content:"b";
}
tag{
content:"c";
}
/* tag:after(1) is equivalent to tag:after */
tag:after(1){
content:"d";
}
tag:after(2){
content:"e";
}
Code: Select all
<<root>
<tag>content</tag>
</root>
abccontentde
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
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