Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
<!-- unique key over all groups of apis -->
<xsl:key match="//api" name="apiGroups" use="@group" /> <!-- unique key over all names of apis -->
<xsl:key match="//api" name="apiNames" use="@name" />
<ul>
<li><b>Author:</b><xsl:text> </xsl:text><xsl:value-of select="api-answers/@author" /></li>
<li><b>Answers as of:</b><xsl:text> </xsl:text><xsl:value-of select="$arch.answers.date"/></li>
<li><b>Answers for questions version:</b><xsl:text> </xsl:text><xsl:value-of select="$afor" /></li>
<li><b>Latest available version of questions:</b><xsl:text> </xsl:text><xsl:value-of select="$qver" /></li>
</ul>
<xsl:if test="not($qver=$afor)">
<strong>
WARNING: answering questions version <xsl:value-of select="$afor"/>
rather than the current <xsl:value-of select="$qver"/>.
</strong>
</xsl:if>
<xsl:choose>
<xsl:when test="count(//answer[@id=$value])" >
<b>Answer:</b> <!-- <xsl:value-of select="//answer[@id=$value]" /> -->
<xsl:apply-templates select="//answer[@id=$value]/node()" />
</xsl:when>
<xsl:when test="string-length($arch.when)=0 or contains($arch.when,@when)" >
<b>WARNING:</b>
<xsl:text> Question with id="</xsl:text>
<i>
<xsl:value-of select="@id" />
</i>
<xsl:text>" has not been answered!</xsl:text>
</xsl:when>
<xsl:otherwise>
<i>Needs to be yet answered in <xsl:value-of select="@when" /> phase.</i>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="api"> <!-- generates link to given API -->
<xsl:variable name="name" select="@name" />
<xsl:variable name="group" select="@group" />
<a>
<xsl:attribute name="href" >
<xsl:text>#</xsl:text><xsl:value-of select="$group" /><xsl:text>-</xsl:text><xsl:value-of select="$name" />
</xsl:attribute>
<xsl:value-of select="$name" />
</a> <!-- put "- and description" there only if there are some child nodes -->
<xsl:if test="child::node()" >
- <xsl:apply-templates />
</xsl:if>
</xsl:template>
<!-- Format random HTML elements as is: -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="answer"> <!-- ignore direct answers -->
</xsl:template>
<xsl:template match="hint"> <!-- ignore direct answers -->
</xsl:template>
<!-- enumerates all groups of APIs and calls given template on each of them
-->
<xsl:template name="generate-api-table" >
<xsl:param name="target" />
<xsl:param name="generate-export" select="'true'" />
<xsl:param name="generate-import" select="'true'" />
<xsl:param name="generate-group" select="''" />
<td> <!-- description --> <!-- Put anchor here, since name is centered, and we want hyperlinks to scroll to top of table row: -->
<a>
<xsl:attribute name="id">
<xsl:value-of select="$group" /><xsl:text>-</xsl:text><xsl:value-of select="$name"/>
</xsl:attribute>
</a>
<xsl:call-template name="describe">
<xsl:with-param name="name" select="$name"/>
<xsl:with-param name="group" select="$group"/>
</xsl:call-template>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.