custom.css.source param in WebHelp Classic

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Drumminman
Posts: 6
Joined: Fri Jan 22, 2016 2:52 pm

custom.css.source param in WebHelp Classic

Post by Drumminman »

Hi everyone!
I'm trying to debug my pub scenario for DocBook WebHelp Classic, using Author 24.1, and have few issues.
I have already managed to achieve a correct completion of the publication without fatal errors, but there are still some questions that I would like to clarify for myself in order to achieve a clearer and more predictable publication result.

In particular, there is some misunderstanding of how the custom.css.source parameter works. As far as I understood, in this parameter, I should specify the path to the file that will be processed by the processor, concatenated with the value specified in base.dir, and added as a link to the header of the final index.html.

And here I don't quite understand the system's behavior.
The structure of my project is as follows:
{pd} - root directory.
{pd}/Images/WebHelp/ - a directory where the source xml image to be compiled is located.
{pd}/Release/WebHelp/ - the directory where the publication is performed (there are also questions about base.dir/input.dir/output.dir, but I will ask about them separately).
{pd}/Images/!Common/CSS/ - a directory where MainCustom.css.xml is located (a valid xml with a single root tag <style>).
D:/GIT/Docbook/!Common/Tools/Scripts/0_Standard_5.1_Oxy/xsl\com.oxygenxml.webhelp.classic\build_docbook.xml - accordingly, the task file for the publication script.

So I have been tried
1. custom.css.source = ./CSS/MainCustom.css.xml, make.clean.html = 1, generate.css.header = 1, docbook.css.source = docbook.css.xml. The result is (pub was successful, but no additional css links in index.html header):

Code: Select all

     [xslt] : Warning! Failure reading file:/D:/GIT/DocBook/!Common/Tools/Scripts/0_Standard_5.1_Oxy/xsl/xhtml/CSS/MainCustom.css.xml Cause: java.io.FileNotFoundException: D:\GIT\DocBook\!Common\Tools\Scripts\0_Standard_5.1_Oxy\xsl\xhtml\CSS\MainCustom.css.xml (Системе не удается найти указанный путь)
     [xslt] Writing D:\GIT\Test/Release/WebHelp_Test/oxygen-main.html for book.
At the same time, a link to the required CSS file is not added to the index.html file. And the same result with any variation of relative path to the css-file. And the docbook.css file is also not created in this case.

2. custom.css.source = ${pd}/Images/!Common/CSS/MainCustom.css.xml (fixed path), make.clean.html = 1, generate.css.header = 1, docbook.css.source = docbook.css.xml. The result is (pub was failed):

Code: Select all

Caused by: javax.xml.transform.TransformerException: Malformed URL {pd}/Images/!Common/CSS/MainCustom.css.xml(base file:/D:/GIT/DocBook/!Common/Tools/Scripts/0_Standard_5.1_Oxy/xsl/xhtml/profile-chunk-code.xsl)
	at org.apache.xml.resolver.tools.CatalogResolverXerces.resolve(CatalogResolverXerces.java:274)
	... 156 more
Caused by: java.net.MalformedURLException: unknown protocol: d
	at java.base/java.net.URL.<init>(URL.java:681)
	at java.base/java.net.URL.<init>(URL.java:569)
	at org.apache.xml.resolver.tools.CatalogResolverXerces.resolve(CatalogResolverXerces.java:257)
3. I have also tried variants where I placed the source file MainCustom.css.xml directly in the directory specified by base.dir, and specified only the file name as the value for custom.css.source. The result was the same as in case 1.

4. But, if set custom.css.source to empty, and set html.stylesheet = ${pd}/Images/!Common/CSS/MainCustom.css, I'll get the the success and css link in index.hmtl head pointed to "/CSS/MainCustom.css_<some_id>".
Could somebody explain me, how all of this stuff is supposed and should to work?