Author Mode how to change default image directory
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Wed Apr 22, 2015 5:36 pm
Author Mode how to change default image directory
Hello!
I am new here, and new to OxygenXML. I am currently working with the DocBook Authoring and Publishing Suite (DAPS) which is a toolchain that uses the DocBook 4.5 / 5 framework created by the SUSE Linux documentation team.
DAPS by default requires a directory structure like this.
I am trying to enable images in Author mode of OxygenXML.
The problem is, the fileref is pointing to the xml directory where all the xml files of the project live. I need to point the author to the image/src/png or image/src/svg depending on file type. Other than copying the images to the xml directory
is there a way to do this that is simple and efficient across the entire project?
Best,
Your local nub-cake bows before your awesomeness!
I am new here, and new to OxygenXML. I am currently working with the DocBook Authoring and Publishing Suite (DAPS) which is a toolchain that uses the DocBook 4.5 / 5 framework created by the SUSE Linux documentation team.
DAPS by default requires a directory structure like this.
Code: Select all
~/Project/my_book
|--images/src/
| |--dia/
| |--fig/
| |--png/
| |--svg/
|
|--xml/
The problem is, the fileref is pointing to the xml directory where all the xml files of the project live. I need to point the author to the image/src/png or image/src/svg depending on file type. Other than copying the images to the xml directory

Best,
Your local nub-cake bows before your awesomeness!
-
- Posts: 2
- Joined: Wed Apr 22, 2015 5:36 pm
Re: Author Mode how to change default image directory
What I am looking for essentially is a "button" or extension that allows you to change the default fileref in the xml directory in oxygen, and point to the location of your images directory in the project folder.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Author Mode how to change default image directory
Hi,
It's possible to do something like this with XML catalogs. But I don't see a way to make it generic, for any named image, only for specific images named/resolved in the catalog.
e.g. for an image named 'lake.png' Create the "catalog.xml" file with the above content and place it in the "my_book" folder.
Add this XML catalog file in Oxygen's Options > Preferences, XML / XML Catalog.
Regards,
Adrian
It's possible to do something like this with XML catalogs. But I don't see a way to make it generic, for any named image, only for specific images named/resolved in the catalog.
e.g. for an image named 'lake.png'
Code: Select all
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uriSuffix uriSuffix="/lake.png" uri="images/src/png/lake.png"/>
</catalog>
Add this XML catalog file in Oxygen's Options > Preferences, XML / XML Catalog.
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
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Author Mode how to change default image directory
Hi,
There is a better way to do this for the Author mode, via CSS (without the XML catalog). You can specify for the image elements from the XML from where the images should be loaded. By default, for DocBook, the CSS snippet that handles this looks like this:
Oxygen provides a number of CSS extension functions that can help with the redirection. In the end it would look like this (note the import with the default CSS):
You can either associate this CSS in the XML for testing (Document > XML Document > Associate XSLT/CSS Stylesheet) or add it in the list of CSSs (Author tab, CSS section) from an extended DocBook 4/5 document type (Options > Preferences, Document Type Association).
Regards,
Adrian
There is a better way to do this for the Author mode, via CSS (without the XML catalog). You can specify for the image elements from the XML from where the images should be loaded. By default, for DocBook, the CSS snippet that handles this looks like this:
Code: Select all
graphic,
inlinegraphic,
imagedata{
content: attr(fileref, url);
}
Code: Select all
@import "docbook.css";
graphic,
inlinegraphic,
imagedata{
content: oxy_url(
oxy_base-uri(),
'../images/src/',
oxy_concat(oxy_substring(attr(fileref), oxy_add(oxy_lastindexof(attr(fileref), "."), 1, 'number')), '/'),
attr(fileref));
}
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)
- ↳ 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