Difference between revisions of "DescAttribute2Element.xslt"
Jump to navigation
Jump to search
(initial check-in with little commentary) |
m (remove blank before XML declaration) |
||
| Line 1: | Line 1: | ||
One casualty of the war on attributes was the P4 desc= attribute. This stylesheet converts it to the P5 <desc> element. | One casualty of the war on attributes was the P4 desc= attribute. This stylesheet converts it to the P5 <desc> element. | ||
| − | <pre><nowiki> | + | <pre><nowiki><?xml version="1.0" encoding="UTF-8"?> |
| − | <?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | ||
| Line 26: | Line 25: | ||
</xsl:template> | </xsl:template> | ||
| − | </xsl:stylesheet> | + | </xsl:stylesheet></nowiki></pre> |
| − | </nowiki></pre> | ||
[[Category:P4toP5]] | [[Category:P4toP5]] | ||
Revision as of 01:50, 6 October 2006
One casualty of the war on attributes was the P4 desc= attribute. This stylesheet converts it to the P5 <desc> element.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Change the TEI P4:2004 desc= attributes into P5 <desc> elements -->
<!-- Copyleft 2006 Syd Bauman and the Brown University Women Writers Project -->
<xsl:import href="Copy-All.xsl"/>
<!-- Match any of the culprit attributes ... -->
<xsl:template
match="certainty/@desc
| respons/@desc
| gap/@desc
| join/@desc
| joinGrp/@desc
| event/@desc
| kinesic/@desc
| vocal/@desc">
<!-- ... spit it out as a <desc> element. -->
<xsl:element name="desc">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>