Difference between revisions of "DescAttribute2Element.xslt"
Jump to navigation
Jump to search
m (remove blank before XML declaration) |
Stuartyeates (talk | contribs) |
||
| Line 28: | Line 28: | ||
[[Category:P4toP5]] | [[Category:P4toP5]] | ||
| + | [[Category:XSLT]] | ||
Latest revision as of 08:11, 14 March 2010
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>