This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: style sheet line
- From: Bob Stayton <bobs at caldera dot com>
- To: dbook at centrum dot cz, docbook-apps at lists dot oasis-open dot org
- Date: Thu, 11 Apr 2002 09:45:53 -0700
- Subject: Re: DOCBOOK-APPS: style sheet line
- References: <20020411135251Z684237-30363+680@mail.centrum.cz>
On Thu, Apr 11, 2002 at 03:52:43PM +0200, dbook@centrum.cz wrote:
> Hi,
> I have got a little problem with adding style sheet line
> (second line in source). I'm writing XSL sheet for converting
> DocBook -> HTML+MathML.
>
> I would like to get after transformation:
>
> 1. <?xml version="1.0" encoding="UTF-8"?>
> 2. <?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
> ... some HTML and MathML tags.
>
> Is there any way, how to write XSL which will do that(insert 2.
> line). The reason is using document in IE + Math plug-in.
As with the previous request to output comments,
you can use <xsl:text> as follows in your customization layer:
<xsl:template match="/">
<xsl:text disable-output-escaping="yes"><?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
</xsl:text>
<xsl:apply-imports/>
</xsl:template>
This template match intercepts the root element processing
in order to output the xsl-stylesheet processing instruction.
Then <xsl:apply-imports/> element passes it on
to the real root processor.
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com