Created
September 18, 2013 07:40
-
-
Save anonymous/6605825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<events> | |
<eventTitle result="error"> | |
<message>Message Title</message> | |
<fieldName1 label="label1" type="missing|invalid" message="Field Message 1" /> | |
<fieldName2 label="label2" type="missing|invalid" message="Field Message 2" /> | |
</eventTitle> | |
</events> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="xml" indent="yes" /> | |
<xsl:template match="events"> | |
<xsl:apply-templates select="eventTitle" /> | |
</xsl:template> | |
<xsl:template match="eventTitle"> | |
<result type="{@result}"> | |
<title> | |
<xsl:value-of select="message" /> | |
</title> | |
<messages> | |
<xsl:apply-templates select="*[@message]" /> | |
</messages> | |
</result> | |
</xsl:template> | |
<xsl:template match="*[@message]"> | |
<message> | |
<xsl:value-of select="@message" /> | |
</message> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment