| 1 | <?xml version="1.0" encoding='ISO-8859-1' ?> |
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 3 | <!-- |
| 4 | * Copyright (c) 2012 Joerg Wunsch |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
| 19 | * |
| 20 | * $Id: ocdrev.xsl 315 2012-12-13 16:44:43Z joerg_wunsch $ |
| 21 | --> |
| 22 | <!-- |
| 23 | * Extract OCD_REVISION and OSCCAL out of Atmel Studio 6.x device XML files. |
| 24 | --> |
| 25 | <xsl:output method="text"/> |
| 26 | |
| 27 | <xsl:template match="//property[@name='OCD_REVISION'][//register[@name='OSCCAL']]"> |
| 28 | |
| 29 | <xsl:value-of select="//device/@name" /> |
| 30 | <xsl:text>	</xsl:text> |
| 31 | <xsl:value-of select="//register[@name='OSCCAL']/@offset" /> |
| 32 | <xsl:text>	</xsl:text> |
| 33 | <xsl:value-of select="//property[@name='OCD_REVISION']/@value" /> |
| 34 | <xsl:text> </xsl:text> |
| 35 | |
| 36 | </xsl:template> |
| 37 | |
| 38 | <xsl:template match="node()"> |
| 39 | <xsl:apply-templates /> |
| 40 | </xsl:template> |
| 41 | |
| 42 | <xsl:template match="/"> |
| 43 | <xsl:apply-templates /> |
| 44 | </xsl:template> |
| 45 | |
| 46 | </xsl:stylesheet> |