Print

Print


Hi Daren,

The solution is to use Saxon 6.5.3.

You are using Saxon 8 which is an XSLT 2.0 processor.
The teihtml-chunk.xsl where you get the error is an XSLT 1.1 stylesheet
and takes advantage of the xsl:document that was added in XSLT 1.1 and
renamed in XSLT 2.0 to xsl:result-document. Saxon 6.5.3 supports XSLT
1.0 and 1.1. For more information see

http://saxon.sourceforge.net/saxon6.5.3/xsl-elements.html#xsl:document

Hope that helps,
George
------------------------
George Cristian Bina
http://www.oxygenxml.com

Darren Boss wrote:
> I just downloaded the TEI html stylesheets from
> http://www.tei-c.org/Stylesheets/teixsl.html and Saxon from
> http://prdownloads.sourceforge.net/saxon/saxonb8-1-1.zip. I extracted
> both to my OS X desktop and created a new folder for testing and copied
> the teixsl.xml file from the stylesheets into that directory. I then
> tried to transform that file using the following command line:
>
> java -jar ~/Desktop/saxonb8-1-1/saxon8.jar teixsl.xml
> ~/Desktop/teixsl-html/html/teihtml.xsl
>
> I received the following error messages:
>
> Error at xsl:document on line 96 of
> file:/Users/db5/Desktop/teixsl-html/html/teihtml-chunk.xsl:
>   Attribute {encoding} is not allowed on this element
> Error at xsl:document on line 96 of
> file:/Users/db5/Desktop/teixsl-html/html/teihtml-chunk.xsl:
>   Attribute {method} is not allowed on this element
> Error at xsl:document on line 96 of
> file:/Users/db5/Desktop/teixsl-html/html/teihtml-chunk.xsl:
>   Attribute {doctype-public} is not allowed on this element
> Error at xsl:document on line 96 of
> file:/Users/db5/Desktop/teixsl-html/html/teihtml-chunk.xsl:
>   Attribute {href} is not allowed on this element
> Warning: at xsl:if on line 197 of
> file:/Users/db5/Desktop/teixsl-html/html/teihtml-struct.xsl:
>   Less-than and greater-than comparisons between strings have changed
> since XPath 1.0
> Failed to compile stylesheet. 4 errors detected.
>
> I originally tried to incorporate the TEI xsl into Cocoon but received
> the "Attribute {encoding} is not allowed on this element" after
> figuring out how to add Saxon to Cocoon and pass the STDOUT parameter
> in <map:transform>. I wanted to attempt the transform on the command
> line before trying to debug my Cocoon installation.
>
> Am I missing something or has something changed in either the
> stylesheets or Saxon recently to cause this to break?
>
> I'm attempting the command line transform on OS X 10.3.7, Java
> 1.4.2_05. My Cocoon installation is on a fully patched RHEL 3.0 box
> running Java 1.4.2_05-b04, Cocoon 2.1.5.1 and Tomcat 5.0.27.
>
> --
> Darren Boss
> Applications Developer/System Administrator
> TAPoR Project - http://tapor.ualberta.ca/
> University of Alberta