Published in: XML
<?xml version="1.0"?> <xsl:stylesheet version = "1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/> <xsl:template match="/"> <songlist> <xsl:apply-templates select="plist/dict/dict/dict"/> </songlist> </xsl:template> <xsl:template match="dict"> <song> <xsl:apply-templates select="key"/> </song> </xsl:template> <xsl:template match="key"> <xsl:element name="{translate(text(), ' ', '_')}"> <xsl:value-of select="following-sibling::node()[1]"/> </xsl:element> </xsl:template> </xsl:stylesheet>
You need to login to post a comment.
