Exclude text from output
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 37
- Joined: Wed Dec 23, 2009 6:13 am
Exclude text from output
I would like to mark text in DocBook 5 with several types of <phrase> tags and have the ability to specify that text as print only, web only or do not output when transformed:
e.g. <phrase condition="print"> will show the text in print output only (i.e. exclude that marked text from HTML output), or <phrase condition="web"> will show the text only in HTML output (i.e. excluded from FO transformation).
So, what is the XSL or FO code that would ignore (exclude) block text from output for these alternatives?
Thanks
e.g. <phrase condition="print"> will show the text in print output only (i.e. exclude that marked text from HTML output), or <phrase condition="web"> will show the text only in HTML output (i.e. excluded from FO transformation).
So, what is the XSL or FO code that would ignore (exclude) block text from output for these alternatives?
Thanks
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Exclude text from output
Hello,
What you are looking for are the DocBook profiling stylesheets.
You can find them as follows:
- FO(PDF) - [oxygen_folder]/frameworks/docbook/xsl/fo/profile-docbook.xsl
- XHTML - [oxygen_folder]/frameworks/docbook/xsl/xhtml/profile-docbook.xsl
- XHTML chunk - [oxygen_folder]/frameworks/docbook/xsl/xhtml/profile-chunk.xsl
- HTML - [oxygen_folder]/frameworks/docbook/xsl/html/profile-docbook.xsl
- HTML chunk - [oxygen_folder]/frameworks/docbook/xsl/html/profile-chunk.xsl
Having opened a DocBook 5 document go to Document -> Transformation -> Configure Transformation Scenario, Duplicate the scenario that you need and give it a proper name. Change the stylesheet to the appropriate one with profiling from the list above. You can simply browse for it using the Browse button.
e.g. for PDF change it from:
${frameworks}/docbook/xsl/fo/docbook_custom.xsl
to
${frameworks}/docbook/xsl/fo/profile-docbook.xsl
Press Parameters and in the shown list look for 'profile.condition', Edit it and give it the desired value. e.g. web
OK in all dialogs.
Now when you transform this scenario all the elements that have the 'condition' attribute set to 'web' will be kept, while the ones that have it set to other values will be excluded.
You can duplicate this scenario and set the 'profile.condition' parameter to various values thus transforming it with the specified profile.
Let me know if you need further assistance.
Regards,
Adrian
What you are looking for are the DocBook profiling stylesheets.
You can find them as follows:
- FO(PDF) - [oxygen_folder]/frameworks/docbook/xsl/fo/profile-docbook.xsl
- XHTML - [oxygen_folder]/frameworks/docbook/xsl/xhtml/profile-docbook.xsl
- XHTML chunk - [oxygen_folder]/frameworks/docbook/xsl/xhtml/profile-chunk.xsl
- HTML - [oxygen_folder]/frameworks/docbook/xsl/html/profile-docbook.xsl
- HTML chunk - [oxygen_folder]/frameworks/docbook/xsl/html/profile-chunk.xsl
Having opened a DocBook 5 document go to Document -> Transformation -> Configure Transformation Scenario, Duplicate the scenario that you need and give it a proper name. Change the stylesheet to the appropriate one with profiling from the list above. You can simply browse for it using the Browse button.
e.g. for PDF change it from:
${frameworks}/docbook/xsl/fo/docbook_custom.xsl
to
${frameworks}/docbook/xsl/fo/profile-docbook.xsl
Press Parameters and in the shown list look for 'profile.condition', Edit it and give it the desired value. e.g. web
OK in all dialogs.
Now when you transform this scenario all the elements that have the 'condition' attribute set to 'web' will be kept, while the ones that have it set to other values will be excluded.
You can duplicate this scenario and set the 'profile.condition' parameter to various values thus transforming it with the specified profile.
Let me know if you need further assistance.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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