Thanks Bob !
That worked great.
In a message dated 10/31/2008 11:21:56 A.M. Pacific Daylight Time,
bobs@sagehill.net writes:
Most likely you are chunking and running into the issue of import
precedence. The chunking templates use xsl:import, and you are introducing another
layer of import precedence and it isn't working right.
But there is a relatively new hook for doing what you want. The
user.preroot placeholder template is executed before and could be used for your
purposes. Search for 'user.preroot' in:
_http://www.sagehill.net/docbookxsl/HtmlHead.html_
(http://www.sagehill.net/docbookxsl/HtmlHead.html)
Add something like this to your customization:
<xsl:template name="user.preroot">
<xsl:processing-instruction name="xml-stylesheet">
<xsl:text>type="text/xsl" href="mathml.xsl"</xsl:text>
</xsl:processing-instruction>
</xsl:template>
Bob Stayton
Sagehill Enterprises
_bobs@sagehill.net_ (mailto:
bobs@sagehill.net)
----- Original Message -----
From:
_DeanNelson@aol.com_ (mailto:
DeanNelson@aol.com)
To:
_docbook-apps@lists.oasis-open.org_(mailto:
docbook-apps@lists.oasis-open.org)
Sent: Friday, October 31, 2008 11:10 AM
Subject: [docbook-apps] XSL Stylesheet in XHTML
Hello all,
I am trying to add an XSL stylesheet to the top of my XHTML output - like so:
_http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd_
(http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd) ">
_
(http://www.w3.org/1999/xhtml">)
. . . .
I have looked through the archives and found the same issue expressed a few
years ago. The answer was to add a template to the customization layer that
inserted the line.
<xsl:template match="/">
<xsl:processing-instruction name="xml-stylesheet">
<xsl:text>type="text/xsl" href="mathml.xsl"</xsl:text>
</xsl:processing-instruction>
<xsl:apply-imports/>
</xsl:template>
Looked simple enough, so I added it to my customization layer. However, it
ran as usual but the first two lines showed up on the console and the output
file did not include the XSL stylesheet line.
I usually use XSLTPROC which had the console output anomaly but I also ran
it with Saxon 6.5.5 which had similar problems (but did not output the lines
to the console).
This is a bit puzzling. Did I do it incorrectly or is there another way to
do that?
Thanks
Dean Nelson
____________________________________
Plan your next getaway with AOL Travel. _Check out Today's Hot 5 Travel
Deals!_
(http://pr.atwola.com/promoclk/100000075x1212416248x1200771803/aol?redir=http://travel.aol.com/discount-travel?ncid=emlcntustrav00000001)
**************Plan your next getaway with AOL Travel. Check out Today's Hot
5 Travel Deals!
(http://pr.atwola.com/promoclk/100000075x1212416248x1200771803/aol?redir=http://travel.aol.com/discount-travel?ncid=emlcntustrav00000001)