[sword-devel] namespaces in xsl

Daniel Owens dcowens76 at gmail.com
Thu Jul 26 13:26:39 MST 2012

I am writing a stylesheet to display Abbott-Smith's Manual Greek Lexicon 
of the New Testament from Github where I will post releases. I have no 
idea how to get the namespace declaration right in the xsl file. I have 
googled and tried several solutions, but so far nothing works.

The source document, abbott-smith.xml, begins:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="abbott-smith.xsl"?>
<TEI xmlns="http://www.crosswire.org/2008/TEIOSIS/namespace" 

Here is how abbott-smith.xsl begins:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
<xsl:output method="html" />

The only way I can get the xsl to work is to delete the namespace 
declaration from the source document, which does not seem like good 
practice. Simply adding 
xmlns="http://www.crosswire.org/2008/TEIOSIS/namespace" to 
<xsl:stylesheet> in abbott-smith.xsl does not work. Nor does adding it 
as xmlns:tei and adding /tei: to the first XPath query.

Can anyone help me?


More information about the sword-devel mailing list