Changeset 4 in recipecards for trunk/recipe.xsl


Ignore:
Timestamp:
09/11/13 19:49:05 (11 years ago)
Author:
peter
Message:
  • put the recipe XML into a namespace (http://xmlns.grim.ath.cx/recipe)
  • match "degrees" and turn it into a degree symbol
  • added a recipe.html.xsl stylesheet that transforms recipe XML into HTML marked up with the hRecipe microformat
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/recipe.xsl

    r2 r4  
    33<xsl:stylesheet version="1.0" 
    44  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
     5  xmlns:recipe="http://xmlns.grim.ath.cx/recipe" 
    56  xmlns:fo="http://www.w3.org/1999/XSL/Format"> 
    67 
     
    1213  <xsl:variable name="width" select="substring-after($size, 'x')"/> 
    1314 
    14   <xsl:template match="recipe"> 
     15  <xsl:template match="recipe:recipe"> 
    1516    <fo:root font-family="DejaVuSerif" font-size="10pt"> 
    1617      <fo:layout-master-set> 
     
    2829  </xsl:template> 
    2930 
    30   <xsl:template match="title"> 
     31  <xsl:template match="recipe:title"> 
    3132    <fo:block margin-bottom=".5em" font-weight="bold"> 
    3233      <xsl:value-of select="."/> 
     
    3435  </xsl:template> 
    3536 
    36   <xsl:template match="ingredients"> 
     37  <xsl:template match="recipe:ingredients"> 
    3738    <fo:block margin-bottom=".5em"> 
    3839      <xsl:apply-templates/> 
     
    4041  </xsl:template> 
    4142 
    42   <xsl:template match="ingredient"> 
     43  <xsl:template match="recipe:ingredient"> 
    4344    <fo:block line-height="1.25"><xsl:value-of select="."/></fo:block> 
    4445  </xsl:template> 
    4546 
    46   <xsl:template match="note"> 
     47  <xsl:template match="recipe:note"> 
    4748    <fo:block line-height="1.25" margin-left="1em" font-size="90%"><xsl:value-of select="."/></fo:block> 
    4849  </xsl:template> 
    4950 
    50   <xsl:template match="para"> 
     51  <xsl:template match="recipe:para"> 
    5152    <fo:block margin-bottom=".5em"> 
    5253      <xsl:value-of select="."/> 
Note: See TracChangeset for help on using the changeset viewer.