Edits to xsdDocHtml.xsl Don't Have Any Effect
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 37
- Joined: Wed Jun 19, 2013 1:49 am
Edits to xsdDocHtml.xsl Don't Have Any Effect
I'm trying to customize the schema documentation XSLT transformation (C:\Program Files\Oxygen XML Editor 17\frameworks\schema_documentation\xsl\xsdDocHtml.xsl) and have found that my change doesn't have any effect (I gave myself read/write permission to this file).
I want to add a link to my own cascading stylesheet to the resulting HTML file. I.e., add the line:
I found three lines in the XSL file that link to your style sheet:
So I figured all I had to do was add my extra line to your XSL file three times – one time after each of your three lines.
But my addition doesn't show up in the resulting HTML file. It's as if I'm editing the wrong file! What is going on?
I want to add a link to my own cascading stylesheet to the resulting HTML file. I.e., add the line:
Code: Select all
<link rel="stylesheet" href="../mystyles.css" type="text/css" />
Code: Select all
<link rel="stylesheet" href="docHtml.css" type="text/css" />
But my addition doesn't show up in the resulting HTML file. It's as if I'm editing the wrong file! What is going on?
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Edits to xsdDocHtml.xsl Don't Have Any Effect
Post by alex_jitianu »
Hello,
You mentioned you have customized {oxygenInstallDir}\frameworks\schema_documentation\xsl\xsdDocHtml.xsl. This means that the CSS file copied and applied is: {oxygenInstallDir}\frameworks\schema_documentation\xsl\docHtml.xsl. You could just add your CSS rules inside this file and you wont have to do anything else.
If you don't want the previous approach then please tell me if after you've done your changes, when you look inside the generated HTML, is the "link" to your CSS present there? I expect there is. What I suspect missing is the fact that the CSS file also has to be copied next to the HTML output in order for the link to actually work. There are at least two ways to do that:
- inside xsdDocHtml.xsl there is a template that copies the default CSS file:
You could append inside this template another xsl:result-document that copies the additional CSS. You can put your CSS next to the XSL like we are doing and compose absolute paths based on that assumption.
Best regards,
Alex
You mentioned you have customized {oxygenInstallDir}\frameworks\schema_documentation\xsl\xsdDocHtml.xsl. This means that the CSS file copied and applied is: {oxygenInstallDir}\frameworks\schema_documentation\xsl\docHtml.xsl. You could just add your CSS rules inside this file and you wont have to do anything else.
If you don't want the previous approach then please tell me if after you've done your changes, when you look inside the generated HTML, is the "link" to your CSS present there? I expect there is. What I suspect missing is the fact that the CSS file also has to be copied next to the HTML output in order for the link to actually work. There are at least two ways to do that:
- inside xsdDocHtml.xsl there is a template that copies the default CSS file:
Code: Select all
<xsl:template name="copyCSSFile">
<xsl:result-document href="{$cssCopyLocation}" method="text">
<xsl:value-of disable-output-escaping="yes" select="unparsed-text($cssRelativeLocationToXSL,'UTF-8')"/>
</xsl:result-document>
</xsl:template>
Best regards,
Alex
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