Hello Joe,

Joe Williams wrote:
Thanks for the response, let me see if this makes things clearer.

I'm not getting an error message, but the formatting changes to the DocBook
XSL (by means of my CSS) do not appear in the browser.

The URL:

http://myserver:8080/cocoon/book/book

This succeeds in calling the document. When I view the source of the
displayed HTML, the link to the CSS stylesheet appears:

<link href="book.css" rel="stylesheet" type="text/css">

so far everything seems to be clear and ok. Try to access


http://myserver:8080/cocoon/book/book.css

in your browser to see if you get the CSS.

Therefore, I expect the changes to appear, but they do not. The CSS is in
the same directory ("book") as the XML source ("book.xml") the XSL
stylesheet ("book.xsl") and the CSS ("book.css")

This is more or less not interesting for the browser. Important is only the mapping in the sitemap. You wrote already you have the following two pipelines:


<map:pipeline>
  <map:match pattern="book">
    <map:generate src="book.xml"/>
    <map:transform src="book.xsl">
      <map:parameter name="css-stylesheet" value="book.css"/>
    </map:transform>
    <map:serialize/>
  </map:match>

  <map:match pattern="*.css">
    <map:read src="{1}.css" mime-type="text/css"/>
  </map:match>
</map:pipeline>

Only here (= for the sitemap) the directories are interesting. As you wrote the pipeline it's correct to have both files in the same directory.

What do you want to reach with

<map:parameter name="css-stylesheet" value="book.css"/>

?? Do you have a global <xsl:param name="css-stylesheet"/> in your book.xsl? Otherwise the <map:parameter/> is useless. You already configured your DocBook with

<xsl:param name="html.stylesheet" select="'book.css'"/>

and that's correct.

This only for clarification. Test the stylesheet independent of the DocBook HTML with "http://myserver:8080/cocoon/book/book.css";. If you get it, hmm, I don't know. If not, what do you get?

I have not tried Lionel's suggestions yet, but will do so.

Sorry, but this won't help you much. You don't want to include the CSS in the DocBook HTML, but a <link> element refering to the CSS. So you only must pass the CSS's name and not the CSS itself to the XSLT stylesheet.


Using document('host:8080/book.css') won't work either, because you can't read text with it, only XML.

And the third suggestion using a <xsl:template match="/"/> can break the DocBook transformation completely. Use the parameterization as suggested by Norman Walsh and as you already did it.

Regards,

Joerg

----- Original Message -----
From: "Joerg Heinicke" <[EMAIL PROTECTED]>


Hello Joe,

you don't give very exact error description, only "it does not work". So
it's only possible to guess. Or you give us more information.

I guess the error is a missing or a wrong match for the CSS.

The information you can provide:

1. Which URL do you type in the browser for the Cocoon delivered HTML.

2. How does the according match pattern in the sitemap for the docbook
transformation look like.

3. How does the <link/> tag for the CSS in the generated HTML look like?

4. How does the according match pattern in the sitemap for the CSS look

like?


The transformation offline or in Cocoon may be different (but I don't

really


think so), but has nothing to do with the loading of the CSS.

Regards,

Joerg

--


System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to