OK, so the <body_text> thing was a separate issue relating to a missing XSL 
template in your customization, so I presume you fixed that.

Regarding the CSS, the Oxygen editor has its own CSS for displaying editable 
DocBook XML in the editor.  That CSS has selectors that match docbook element 
names as in your example.  Those CSS styles are only used in Oxygen, and do not 
propagate out to the HTML in any way.  This can be considered a good feature, 
because it allows you to define styles that are useful for editing purposes 
that are independent of the final output formats.

Those CSS styles will not work with HTML output, because the selectors match on 
DocBook element names, not HTML element names. You need another CSS file if you 
want to style the HTML output.

The DocBook XSL stylesheets support generating a CSS file during processing, 
deriving the styles from an XML file that contains a <style> element whose 
content is the CSS text you want in the CSS file.  The <style> element is there 
only to make the input file a well-formed XML file that can be processed with 
XSLT (since a CSS text file cannot be).  The stylesheet then generates a CSS 
text file from that input file.  See the reference pages for these params for 
more details:

http://docbook.sourceforge.net/release/xsl/current/doc/html/docbook.css.source.html

http://docbook.sourceforge.net/release/xsl/current/doc/html/custom.css.source.html

Bob Stayton
Sagehill Enterprises
[email protected]


  ----- Original Message ----- 
  From: [email protected] 
  To: Bob Stayton ; [email protected] 
  Sent: Wednesday, February 01, 2012 6:27 AM
  Subject: Re: [docbook-apps] Oxygen XML Editor: Docbook XML to HTML using CSS


  Hello Bob, 

  the error message you mentioned and the code you have stated is correct. 

  As an example: 

  chapter>sect1>title,
  sect1>sect2>title,
  sect2>sect3>title,
  chapter>title
  {
    font-size: 16pt;
    text-align: left;
    font-weight: bold;
    padding-bottom: 24pt;
  } 


  As you can see we re-defined some default styles in our custom css 
stylesheet, the question is if we have to re-define them as well inside our 
custom xsl stylesheet for creating HTML in our custom style. 
  If so, do we need a css stylesheet at all or is it simply for the display in 
our Editor ( Oxygen). 



  Liebe Grüße 
  Daniel Keyes 


  F I N A R I S
  Financial Software Partner GmbH
  Sömmerringstr. 23
  60322 Frankfurt

  Fon: +49-(0)69-25498-16 
  Fax: +49-(0)69-25498-50
  E-Mail: [email protected]
  www: http://www.finaris.de
  www: http://www.rapidrep.com 


        From:  "Bob Stayton" <[email protected]>  
        To:  <[email protected]>, <[email protected]>  
        Date:  31.01.2012 17:55  
        Subject:  Re: [docbook-apps] Oxygen XML Editor: Docbook XML to HTML 
using CSS 


------------------------------------------------------------------------------



  Hi Daniel, 
  I'm not clear what the problem is here.  You say you are generating HTML 
output, but your example in red is not an HTML output element, and you show the 
element markup itself as being displayed in the browser in red.   
    
  I suspect this is displaying an error-flagging feature of the DocBook XSL 
stylesheet.  When the stylesheet encounters an input element it does not 
recognize, it generates an error message along the lines of: 
    
       Element body_text in namespace '' encountered in chapter, but no 
template matches. 
    
  and then outputs the element as escaped markup in red, with the intent of 
making it visible so it can be fixed: 
    
      <span style="color: red">&lt;body_text&gt;test&lt;/body_text&gt;</span> 
    
  Can you peek inside your HTML and see if that is what you are getting?  If 
so, then your customization layer needs to add a template with 
match="body_text" to process that element. 
    
  Bob Stayton
  Sagehill Enterprises
  [email protected] 
    
    
  ----- Original Message ----- 
  From: [email protected] 
  To: [email protected] 
  Sent: Tuesday, January 31, 2012 2:43 AM 
  Subject: [docbook-apps] Oxygen XML Editor: Docbook XML to HTML using CSS 

  Hello, 

  currently we are having some problems customizing the respective XSL 
stylesheet for transforming our documents into Html ( and if it works also 
XHTML, webhelp etc.). 
  The problems seems to be that Oxygen in a way is blocking our CSS stylesheet, 
since it is obviously recognized by the XSL stylesheet: 

  <xsl:template name="user.head.content"> 
         <style type="text/css"> 
             &css; 
         </style> 
     </xsl:template> 

  The code staed above is working out pretty fine, but still the result we we 
see is not what we configured. 


  As a consequence, the ouput is not what it should be. 

  Instead applying what was specified: 

  body_text{ 
    font-family: Ariel; 
    font-size: 10pt; 
    line-height: 100%; 
    text-align: left; 
    padding-bottom: 12pt; 
  } 

  the result is <body_text>test</body_text> . It is red instead of black. 


  Can anyone give me a hint what the problem is? Have I configured Oxygen 
incorrectly or is it the XSL Stylesheet. 

  Thanks! 

  Daniel Keyes 




  =======================================================
  Disclaimer
  The information contained in this e - mail and any attachments
  ( together the "message") is intended for the addressee only and may 
  contain confidential and/or privileged information. If you have received
  the message by mistake please delete it and notify the sender and do
  not copy or distribute it or disclose its contents to anyone.

  FINARIS Financial Software Partner GmbH
  Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
  Registered at Frankfurt/Main, HRB 52873

  Managing Directors: 
  Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl. Inf. Werner Märkl
  ======================================================= 


  =======================================================
  Disclaimer
  The information contained in this e - mail and any attachments
  ( together the "message") is intended for the addressee only and may 
  contain confidential and/or privileged information. If you have received
  the message by mistake please delete it and notify the sender and do
  not copy or distribute it or disclose its contents to anyone.

  FINARIS Financial Software Partner GmbH
  Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
  Registered at Frankfurt/Main, HRB 52873

  Managing Directors: 
  Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl. Inf. Werner Märkl
  =======================================================

Reply via email to