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 "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
21
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
22
<xsl:output method="xml" indent="yes"/>
24
<xsl:template match="Class">
26
<xsl:apply-templates select="Order"/>
30
<xsl:template match="Order">
31
Order is: <xsl:value-of select="@Name"/>
32
<xsl:apply-templates select="Family"/><xsl:text>
36
<xsl:template match="Family">
37
Family is: <xsl:value-of select="@Name"/>
38
<xsl:apply-templates select="Species | SubFamily | text()"/>
41
<xsl:template match="SubFamily">
42
SubFamily is <xsl:value-of select="@Name"/>
43
<xsl:apply-templates select="Species | text()"/>
46
<xsl:template match="Species">
48
<xsl:when test="name(..)='SubFamily'">
49
<xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="@Scientific_Name"/>
52
<xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="@Scientific_Name"/>