OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Using a CSS


If you want to use CSS to render your DocBook document, you just need to
open your XML file in your web browser.  IE, Mozilla (and derivatives), and
Opera all support associating CSS directly with XML files.

When you run the file through Xalan, you are using XSLT to create HTML files
from the XML.  You use the html.stylesheet parameter to associate CSS with
these HTML files.  Your command should create a file named article.html,
that will load in the cascading stylesheet.  However, since this is HTML,
not XML, your style rule on 'para' won't work.  You'll need to change the
'para' to 'p' in your cascading style sheet to see the new style in the
HTML.

> -----Original Message-----
> From: JABakken@dstsystems.com [mailto:JABakken@dstsystems.com]
> Sent: Thursday, May 08, 2003 10:18 AM
> To: docbook-apps@lists.oasis-open.org
> Subject: [docbook-apps] Using a CSS
> 
> 
> Please once again forgive my complete ignorance. As a test, I 
> created a
> very simple XML file using XXE. I also created a very simple 
> CSS that only
> specifies the display of the <para> element. Using Xalan I 
> created an html
> using the html.stylesheet parameter. Nothing happened.
> 
> Here is a sample of the xml file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/css" href="style.css"?>
> <!DOCTYPE article SYSTEM "file:///C:/DocBook/DTD/docbookx.dtd">
> <article>
>   <title>Sample Article</title>
> 
>   <sect1>
>     <title>A CSS Test</title>
> 
>     <para>This is to test whether the css actually works.</para>
>   </sect1>
> </article>
> 
> 
> And here is what I typed at the command line:
> 
> java org.apache.xalan.xslt.Process -out
> C:/Documents/DocBook/05082003/article.html -in
> C:/Documents/DocBook/05082003/article.xml -xsl
> C:/DocBook/XSL/docbook-xsl-1.59.1/html/docbook.xsl -param 
> html.stylesheet
> "style.css"
> 
> 
> Thanks in advance.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: 
> docbook-apps-help@lists.oasis-open.org
> 
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]