Hello,
Im making a lexicon with 2 xml files into one and then style with one xsl stylesheet. I get the error: Parsing an XSLT stylesheet failed. someone that can see what im doing wrong
the xml file:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="lexstyle.xsl"?>
<lexicon>
<title>Lexikon</title>
<logo filename="book.svg"/>
<glossary filename="eng.xml"/>
<glossary filename="swe.xml"/>
<author>Aryan Satarvandi</author>
</lexicon>
and the xsl file
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes" />
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<title>Lexikon</title>
</head>
<body>
<div id="wrap">
<div id ="title">Lexikon</div>
<xsl:for-each select="/lexicon/glossary">
<xsl:apply-templates select="document(@filename)/dictionary" />
</xsl:for-each>
</div>
<xsl:template match="dictionary"/>
<xsl:apply-templates />
</xsl:template>
<p class="words"><xsl:template match="//word">
<xsl:sort order="ascending"/>
<xsl:apply-templates />
</xsl:template>
</p>
</div>
<xsl:template match="word">Orden: <xsl:value-of select="." />
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
and one of the lists
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<!-- Filename: eng.xml -->
<!-- Author: Aryan Satarvandi -->
<!-- Date: 2012-09-30 -->
<dictionary>
<language>Engelsk</language>
<author>Aryan Satarvandi</author>
<word type="1">Work</word>
<word type="1">Bath</word>
<word type="1">Children</word>
<word type="1">Grade</word>
<word type="1">Computer</word>
<word type="1">Degree</word>
<word type="1">Aircraft</word>
<word type="1">Pregnant</word>
<word type="1">Vacant</word>
<word type="1">Lesson</word>
<word type="1">Teacher</word>
<word type="1">Project</word>
<word type="1">Travel</word>
<word type="1">Vacation</word>
<word type="1">Sun</word>
<word type="1">Study</word>
<word type="1">Connection</word>
<word type="1">Bag</word>
<word type="1">Earplugs</word>
</dictionary>