1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23<xsl:stylesheet version="1.0"
24	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
25	xmlns:rng="http://relaxng.org/ns/structure/1.0">
26
27<xsl:output method="text"/>
28
29<xsl:template match="/">
30  <xsl:text>Namespace,Define,Name,Tag,Done,Planned,qname-count&#xa;</xsl:text>
31  <xsl:for-each select="/todo/attribute|/todo/element">
32    <xsl:variable name="namespace" select="@namespace"/>
33    <xsl:variable name="define" select="@define"/>
34    <xsl:variable name="name" select="@name"/>
35    <xsl:variable name="tag" select="@tag"/>
36
37    <xsl:for-each select=".//status">
38      <xsl:value-of select="$namespace"/>
39      <xsl:text>,</xsl:text>
40      <xsl:value-of select="$define"/>
41      <xsl:text>,</xsl:text>
42      <xsl:value-of select="$name"/>
43      <xsl:text>,</xsl:text>
44      <xsl:value-of select="$tag"/>
45      <xsl:text>,</xsl:text>
46      <xsl:value-of select="@done"/>
47      <xsl:text>,</xsl:text>
48      <xsl:value-of select="@planned"/>
49      <xsl:text>,</xsl:text>
50      <xsl:value-of select="@qname-count"/>
51      <xsl:text>&#xa;</xsl:text>
52    </xsl:for-each>
53    <xsl:if test="not(.//status)">
54      <xsl:value-of select="$namespace"/>
55      <xsl:text>,</xsl:text>
56      <xsl:value-of select="$define"/>
57      <xsl:text>,</xsl:text>
58      <xsl:value-of select="$name"/>
59      <xsl:text>,</xsl:text>
60      <xsl:value-of select="$tag"/>
61      <xsl:text>,0,0.5,1&#xa;</xsl:text>
62    </xsl:if>
63  </xsl:for-each>
64</xsl:template>
65
66</xsl:stylesheet>