Re: Which CSS file is used when converting DITA to Web Help?

Hussein Shafie <[email protected]>
Newsgroups gmane.editors.xxe.general
Message-ID <[email protected]>
KAZUKO O. wrote:
> 
> I am a dita user using xxe.
> 
> I want to ask you about xxe V 9.3.
> 
> I am comparing V9.3 to V9.1.
> 
> In the <\addon\config\dita\xsl\webhelp\resources>, webhelp.css is 
> replaced with base.css on the V 9.3.
> 
> But, when I try to convert ditamap file to Web help,
> 
> the following image, “Save Directory(ディレクトリの保存)” dialog, 
> shows the “resources/webhelp.css”
> 
> as a value of the css.
> 
> Therefore the converted webhelp uses the webhelp.css as a css file.
> 
> Is this correct?
> 

"XXE_install_dir/addon/config/dita/xsl/webhelp/resources/" indeed  
contains "base.css" and not "webhelp.css".

However when converting DITA to WebHelp using XXE, during the first  
steps of the conversion, a file called "webhelp.css" is automatically  
created as a copy of "base.css".

Therefore both files always exist during the document conversion process.

However, the CSS file which is actually used by the generated Web Help  
is always called "webhelp.css".

Therefore the answer to your question is: Yes, this is correct.

FYI, this file copy is implemented as follows. Excerpts from  
"XXE_install_dir/addon/config/dita/xslMenu.incl":
---
    <command name="dita.toWebHelp">
      <process>
       ...
        <mkdir dir="resources" />
        <copyProcessResources resources="@xsl/webhelp/resources.list"
                              to="resources" />
        <copyProcessResources resources="xsl/webhelp/resources/base.css"
                              to="resources/webhelp.css" name="css">
          <info>
            <alternateResources name="dita.toWebHelp.alternateCSS" />
          </info>
        </copyProcessResources>
       ...
---


============================================================
What if you want to use a customization of stock "base.css"?
============================================================

Using "Options|Customize Configuration|Customize Document Conversion  
Stylesheets", "Convert To Web Help", "CSS Stylesheet", "Customize...",  
you can create your own custom CSS file. See attached screenshot. See  
also  
https://www.xmlmind.com/xmleditor/_distrib/doc/help/ConversionStylesheetsEditor_reference.html

The custom CSS file I've created this way,  
"/home/hussein/tmp/base_custom.css" (any file name is just fine here),  
contains:
---
@charset "UTF-8";

@import url(__stock_webhelp.css);

.p {
      color: red;
}
---

When such a customization is detected, during the first steps of the  
conversion, XXE performs even more file copies. It copies  
"resources/base.css" to "resources/__stock_webhelp.css" and  
"/home/hussein/tmp/base_custom.css" to "resources/webhelp.css".


--
XMLmind XML Editor Support List
[email protected]
https://www.xmlmind.com/mailman/listinfo/xmleditor-support
custom_webhelp_css.png (image/png, 170.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.