Overriding xml-stylesheet PI with framework CSS
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 23
- Joined: Mon May 19, 2014 11:38 am
Overriding xml-stylesheet PI with framework CSS
Dear Board Members,
Is there a way to make oXygen apply a CSS from a framework despite an xml-stylesheet PI inside the XML document referring to an external CSS file?
I have hundreds of files someone created from a template that included the PI, and would like to exclude the unnecessary complication of an absolute path to an ugly CSS, the necessity of reworking the latter and so on. It is currently not possible to remove the problematic PI from all the files.
Thank you in advance,
AF
Is there a way to make oXygen apply a CSS from a framework despite an xml-stylesheet PI inside the XML document referring to an external CSS file?
I have hundreds of files someone created from a template that included the PI, and would like to exclude the unnecessary complication of an absolute path to an ugly CSS, the necessity of reworking the latter and so on. It is currently not possible to remove the problematic PI from all the files.
Thank you in advance,
AF
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Overriding xml-stylesheet PI with framework CSS
Hi Alexey,
The CSS linked in the document type is considered as having a very high priority.
What you could try would be this:
If you edit your custom document type configuration in the Oxygen Preferences->"Document Type Association" page in the Author->CSS tab you can only decide to ignore the CSS from the document type if the CSS is referenced in the XML document or to merge them together. You could change that setting to Merge.
Then if the XML references to the CSS something like:
you could create an XML catalog catalog.xml in your custom document type's folder which maps from that path to an existing CSS path like:
Then in the Document Type Configuration dialog in the Catalogs tab you could add a reference to that local CSS included in the document type folder.
The local.css can have empty content, it's just necessary that it exists on disk.
Regards,
Radu
The CSS linked in the document type is considered as having a very high priority.
What you could try would be this:
If you edit your custom document type configuration in the Oxygen Preferences->"Document Type Association" page in the Author->CSS tab you can only decide to ignore the CSS from the document type if the CSS is referenced in the XML document or to merge them together. You could change that setting to Merge.
Then if the XML references to the CSS something like:
Code: Select all
<?xml-stylesheet type="text/css" href="path/to/a.css"?>
Code: Select all
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uriSuffix uriSuffix="a.css" uri="local.css"/>
</catalog>
The local.css can have empty content, it's just necessary that it exists on disk.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 23
- Joined: Mon May 19, 2014 11:38 am
Re: Overriding xml-stylesheet PI with framework CSS
Thank you, Radu!
It is indeed a good option and I will probably try it out soon.
I oversaw the option "ignore CSSs in the associated document type" and as you pointed it out, I'd venture to ask: why does it not suffice to solve the problem? I.e., why is the CSS specified by the PI not ignored by oXygen?
It is indeed a good option and I will probably try it out soon.
I oversaw the option "ignore CSSs in the associated document type" and as you pointed it out, I'd venture to ask: why does it not suffice to solve the problem? I.e., why is the CSS specified by the PI not ignored by oXygen?
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Overriding xml-stylesheet PI with framework CSS
Hi,
The option
What you were looking for was an option like
Regards,
Radu
The option
does what it says, it ignores the CSS associated in the document type configuration and uses only the CSS directly referenced in the document."ignore CSSs in the associated document type"
What you were looking for was an option like
but we do not have this. There are very few cases like yours in which you cannot change a certain new file template not to generate a link to an invalid CSS."ignore CSSs linked in the XML document"
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)
- ↳ 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