File: ocdrev.xsl

package info (click to toggle)
avarice 2.14%2Bsvn427-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,364 kB
  • sloc: cpp: 23,577; ansic: 1,135; makefile: 96; sh: 48; python: 26
file content (46 lines) | stat: -rw-r--r-- 1,642 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding='ISO-8859-1' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
 * Copyright (c) 2012 Joerg Wunsch
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
 *
 * $Id: ocdrev.xsl 315 2012-12-13 16:44:43Z joerg_wunsch $
-->
<!--
 * Extract OCD_REVISION and OSCCAL out of Atmel Studio 6.x device XML files.
-->
    <xsl:output method="text"/>

    <xsl:template match="//property[@name='OCD_REVISION'][//register[@name='OSCCAL']]">

      <xsl:value-of select="//device/@name" />
      <xsl:text>&#9;</xsl:text>
      <xsl:value-of select="//register[@name='OSCCAL']/@offset" />
      <xsl:text>&#9;</xsl:text>
      <xsl:value-of select="//property[@name='OCD_REVISION']/@value" />
      <xsl:text>&#10;</xsl:text>

    </xsl:template>

    <xsl:template match="node()">
      <xsl:apply-templates />
    </xsl:template>

    <xsl:template match="/">
      <xsl:apply-templates />
    </xsl:template>

</xsl:stylesheet>