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: XSL Stylesheet in XHTML

Hello all,
I am trying to add an XSL stylesheet to the top of my XHTML output - like so:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="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>
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?
Dean Nelson

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