Transforming TEI P5 with customized XSL
Posted: Sun Nov 13, 2005 6:10 pm
Hello,
I've generated TEI P5 files from the template included with oXygen. While I can transform them into html using the transformation scenario included with oXygen, which relies on TEI XSL stylesheets, I can't transform them with customized XSL stylesheets - the transformation is successful, but the stylesheet rules are not applied and I get only plain text output.
What could be wrong? Both the XML and the XSL validate, but the rules are just not applied. I've tried both Saxon and Xalan.
The TEI P5 file is wrapped in this structure:
My stylesheet looks basically like this:
Any suggestions? Thanks!
I've generated TEI P5 files from the template included with oXygen. While I can transform them into html using the transformation scenario included with oXygen, which relies on TEI XSL stylesheets, I can't transform them with customized XSL stylesheets - the transformation is successful, but the stylesheet rules are not applied and I get only plain text output.
What could be wrong? Both the XML and the XSL validate, but the rules are just not applied. I've tried both Saxon and Xalan.
The TEI P5 file is wrapped in this structure:
Code: Select all
<?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="xml"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
...
</TEI>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xd="http://www.pnp-software.com/XSLTdoc"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:edate="http://exslt.org/dates-and-times"
xmlns:estr="http://exslt.org/strings"
xmlns:exsl="http://exslt.org/common"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:local="http://www.pantor.com/ns/local"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:teix="http://www.tei-c.org/ns/Examples"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
extension-element-prefixes="exsl estr edate"
exclude-result-prefixes="html xd exsl estr edate a fo local rng tei teix"
version="1.0">
<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"></xsl:output>
<xsl:template match="TEI">
<html>
<head>
<link rel="stylesheet" href="skt.css" type="text/css"></link>
<title>
<xsl:value-of select="teiHeader/fileDesc/titleStmt/title"></xsl:value-of>
</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<!-- here follow all sorts of templates for generating the content of <body> -->
</xsl:stylesheet>
Any suggestions? Thanks!