Docbook XML to (X)HTML with CSS Stylesheet
-
- Posts: 9
- Joined: Tue Jan 31, 2012 1:13 pm
Docbook XML to (X)HTML with CSS Stylesheet
Hello,
we´re trying to convert a Docbook document to HTML with the Oxygen XML Editor using CSS. We already have a XSL stylesheet for PDF output.
What we are trying to do is to import or reference our css stylesheet into the xsl stylesheet needed for the transformation process.
An abstract of our XSL stylesheet:
The generated output in the HTML file seems to be correct ( most formats are used),
but our setttings don´t appear right. In this case, body_text appears in red, but not in black as it supposed to.
<body_text>test</body_text>
If we´re trying to manually adjust the HTML file, the formats are recognized. Nevertheless, Oxygen doesn´t transform the the formats correctly. Could you help me with a possible configuration or explaination?
Thanks!
we´re trying to convert a Docbook document to HTML with the Oxygen XML Editor using CSS. We already have a XSL stylesheet for PDF output.
What we are trying to do is to import or reference our css stylesheet into the xsl stylesheet needed for the transformation process.
An abstract of our XSL stylesheet:
Code: Select all
<xsl:template name="user.head.content">
<style type="text/css">
&css;
</style>
</xsl:template>
Code: Select all
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Book Template Title</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><style type="text/css">
@import "docbook.css";
/*RapidRep style sheet definition*/
/*General*/
body_text{
font-family: Ariel;
font-size: 10pt;
line-height: 100%;
text-align: left;
padding-bottom: 12pt;
}
<body_text>test</body_text>
If we´re trying to manually adjust the HTML file, the formats are recognized. Nevertheless, Oxygen doesn´t transform the the formats correctly. Could you help me with a possible configuration or explaination?
Thanks!
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Docbook XML to (X)HTML with CSS Stylesheet
Hi,
I do not quite understand.
Could you give me a complete HTML sample?
So in your customized <style> you import a "docbook.css" which probably is located in the same location as the output HTML file, right?
What does the docbook.css contain? Additional styling for the HTML elements?
Then you use a CSS selector like:
Such a CSS selector would match elements named <body_text> which would appear in the HTML output. Is this right? Do you have in the HTML output such elements?
Regards,
Radu
I do not quite understand.
Could you give me a complete HTML sample?
So in your customized <style> you import a "docbook.css" which probably is located in the same location as the output HTML file, right?
What does the docbook.css contain? Additional styling for the HTML elements?
Then you use a CSS selector like:
Code: Select all
body_text{
.....
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9
- Joined: Tue Jan 31, 2012 1:13 pm
Re: Docbook XML to (X)HTML with CSS Stylesheet
Hi,
we import a custom css file into the stylesheet for tranforming into HTML.This css file is located in the same folder with the other xsl stylesheets and css files.
The docbook.css is imported viainto our custom css file.
What i tried to explain was, that even though we were able to import the custom css file into our stylesheet, the ouptut wasn´t right. We didn´t receive any error messages but we could see that the stylesheet "accessed" the css stylesheet.
we import a custom css file into the stylesheet for tranforming into HTML.This css file is located in the same folder with the other xsl stylesheets and css files.
The docbook.css is imported via
Code: Select all
@import "docbook.css";
What i tried to explain was, that even though we were able to import the custom css file into our stylesheet, the ouptut wasn´t right. We didn´t receive any error messages but we could see that the stylesheet "accessed" the css stylesheet.
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Docbook XML to (X)HTML with CSS Stylesheet
Hi,
Do you mean XSLT stylesheet or do you mean the small <script> embedded in the HTML which imported the "docbook.css"?
Please try to post the content of a small and complete HTML sample file.
Regards,
Radu
I do not understand what you mean by this, what does "stylesheet" mean in this context?We didn´t receive any error messages but we could see that the stylesheet "accessed" .....
Do you mean XSLT stylesheet or do you mean the small <script> embedded in the HTML which imported the "docbook.css"?
Please try to post the content of a small and complete HTML sample file.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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