1
<?xml version="1.0" encoding="utf-8"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
<xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-8"/>
7
<xsl:template match="/cookml">
9
<xsl:apply-templates select="recipe"/>
13
<xsl:template match="recipe">
15
<title><xsl:value-of select="head/@title"/></title>
17
<xsl:for-each select="head/cat">
18
<category><xsl:value-of select="."/></category>
22
<amount><xsl:value-of select="round(head/@servingqty)"/></amount>
23
<unit><xsl:value-of select="head/@servingtype"/></unit>
26
<xsl:for-each select="part">
27
<xsl:if test="@title">
28
<title><xsl:value-of select="@title"/></title>
30
<xsl:for-each select="ingredient">
33
<amount><xsl:value-of select="@qty"/></amount>
36
<unit><xsl:value-of select="@unit"/></unit>
38
<name><xsl:value-of select="@item"/></name>
44
<xsl:for-each select="preparation/text|preparation/step">
46
<xsl:value-of select="."/>