[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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.crosswire.org/2008/TEIOSIS/namespace
http://www.crosswire.org/OSIS/teiP5osis.1.4.xsd">
Here is how abbott-smith.xsl begins:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<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?
Daniel
More information about the sword-devel
mailing list