SVG processing in HTML webhelp
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 86
- Joined: Sun May 03, 2015 7:34 pm
- Location: San Francisco
SVG processing in HTML webhelp
Post by urbanrobots »
hello!
We'd like to add a CSS @import statement in SVG files to reference the skin.css files used in the HTML output. Can this be accomplished by updating templates in the Oxygen Webhelp plugin or should we look into DITA-OT file processing logic?
Thanks,
Nick
We'd like to add a CSS @import statement in SVG files to reference the skin.css files used in the HTML output. Can this be accomplished by updating templates in the Oxygen Webhelp plugin or should we look into DITA-OT file processing logic?
Thanks,
Nick
-
- Posts: 9456
- Joined: Fri Jul 09, 2004 5:18 pm
Re: SVG processing in HTML webhelp
Hi Nick,
Sorry about the delay, we do not have any special support for this on the WebHelp plugin side.
Maybe you could add some extra ANT processing to add in every SVG file the reference to the CSS:
https://ant.apache.org/manual/Tasks/replace.html
or somehow in the DITA OT ANT build stage apply an XSLT over each SVG which changes it and inserts the reference to the CSS.
Regards,
Radu
Sorry about the delay, we do not have any special support for this on the WebHelp plugin side.
Maybe you could add some extra ANT processing to add in every SVG file the reference to the CSS:
https://ant.apache.org/manual/Tasks/replace.html
or somehow in the DITA OT ANT build stage apply an XSLT over each SVG which changes it and inserts the reference to the CSS.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 86
- Joined: Sun May 03, 2015 7:34 pm
- Location: San Francisco
Re: SVG processing in HTML webhelp
Post by urbanrobots »
Hi Radu,
Thank you! That worked very well.
We added a new target to plugin.xml and defined it in build_common.xml.
The target looks for the XML declaration of SVG files and then appends an XML stylesheet with a link to skin.css.
All of our images render in the same "images" output folder, so inserting the same relative link to skin.css worked fine.
Take care,
- Nick
Thank you! That worked very well.
We added a new target to plugin.xml and defined it in build_common.xml.
The target looks for the XML declaration of SVG files and then appends an XML stylesheet with a link to skin.css.
Code: Select all
<target name="fix-svgs">
<property name="style_text">
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="../oxygen-webhelp/resources/skins/skin.css"?>
</property>
<replace dir="${output.dir}/help_files/images" value="${style_text}">
<include name="**/*.svg"/>
<replacetoken><?xml version="1.0" encoding="UTF-8"?></replacetoken>
</replace>
</target>
Take care,
- Nick
Return to “DITA (Editing and Publishing DITA Content)”
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