Page 1 of 1

Newbie: Help understanding how to edit existing XSL

Posted: Thu Jan 17, 2008 2:46 am
by Charlie Williams
Hello,
Goal: To assemble a set of files and xsl and css files to output files that look similar to the company template.
I have a four topic project that transforms to HTML and PDF using the default "DITA to HTML" and "DITA to PDF."
As a first step, I've moved the "dita2html.xsl" file to a folder within my project. When I open the "dita2html.xsl" file from the \C:\Program Files\Oxygen XML Editor 9.0\frameworks\dita\DITA-OT\xsl\dita2html.xsl, it show that it is well formed and there are now problems. When I open the same file from \C:\projects\AdminPassword\source\en\html\stylesheet\XLS\dita2html.xsl, I get these errors:
- Failed to compile
- Saxon failed to read.

I have no idea what is causing this problem. Here is the code.
Thanks,
Charlie


<?xml version="1.0" encoding="UTF-8" ?>
<!-- This file is part of the DITA Open Toolkit project hosted on
Sourceforge.net. See the accompanying license.txt file for
applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved. -->

<!-- ereview.xsl
| DITA topic to HTML for ereview & webreview

-->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
xmlns:xt="http://www.jclark.com/xt"
extension-element-prefixes="saxon xt">

<!-- stylesheet imports -->
<!-- the main dita to xhtml converter -->
<xsl:import href="dita2xhtml.xsl"/>

<xsl:output method="html"
encoding="UTF-8"
indent="no"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
/>

</xsl:stylesheet>

Posted: Thu Jan 17, 2008 11:28 am
by Dan
The stylesheet you copied is depending on other stylesheets.

Code: Select all


<!-- stylesheet imports -->
<!-- the main dita to xhtml converter -->
<xsl:import href="dita2xhtml.xsl"/>
In fact it is an entire tree of stylesheets which import other stylesheets. The "dita2html.xsl" is the root of the dependency tree. You should copy all the stylesheets from the "frameworks\dita\DITA-OT\xsl" to your project.

Regards,
Dan

Thanks for the information

Posted: Thu Jan 17, 2008 8:06 pm
by Charlie Williams
Hello Dan,

Thanks very much for the information. I'll give it a try.

Charlie