I am experiencing something odd with the xslt transform that may be a real issue or may simply be my forgetting something. Anything that has xsl:apply-templates attached to it results in a blank space, and I don't understand why.
The xml I am using is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<TEI.2>
<teiHeader>
<fileDesc>
<titleStmt>
<title>William of Palerne: An Electronic Edition</title>
<author>Anonymous</author>
<editor>Edited by G. H. V. Bunt</editor>
<respStmt>
<resp>
<hi rend="bold">Computer Consultants and Programmers</hi>
</resp>
<name> Susan Gants, Susan Munson, Daniel Pitti, and John Unsworth.</name>
</respStmt>
</titleStmt>
</fileDesc>
</teiHeader>
</TEI>
The xslt I am applying to is is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tei="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="xs tei"
version="2.0">
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="TEI.2">
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<xsl:apply-templates/>
</TEI>
</xsl:template>
<xsl:template match="teiHeader">
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
I expect my result to be the original XML with TEI.2 converted to TEI and the namespace added:
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>William of Palerne: An Electronic Edition</title>
<author>Anonymous</author>
<editor>Edited by G. H. V. Bunt</editor>
<respStmt>
<resp>
<hi rend="bold">Computer Consultants and Programmers</hi>
</resp>
<name> Susan Gants, Susan Munson, Daniel Pitti, and John Unsworth.</name>
</respStmt>
</titleStmt>
</fileDesc>
</teiHeader>
</TEI>
Instead, TEI.2 changes to TEI as expected but teiHeader does not appear:
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<fileDesc xmlns="">
<titleStmt>
<title>William of Palerne: An Electronic Edition</title>
<author>Anonymous</author>
<editor>Edited by G. H. V. Bunt</editor>
<respStmt>
<resp>
<hi>Computer Consultants and Programmers</hi>
</resp>
<name> Susan Gants, Susan Munson, Daniel Pitti, and John Unsworth.</name>
</respStmt>
</titleStmt>
</fileDesc>
</TEI>
I'm sure I've made an error or am overlooking something, but I cannot for the life of me figure out what it is. IF someone could tell me what's messing me up and how to rectify it I would appreciate it.