< HowWierd XML files url="http://howwierd.tripod.com">
<links> home | thoughts | xml resources
</links>

<warning> You need Internet Explorer 5.0 or some means of viewing XML files to see the results of these files.

The source can be viewed and edited in a text editor like notepad. If you use a word processor they must be saved as text only.

Understanding these files requires some knowledge of XML. To learn more about XML the HowWierd XML Resources would be a good place to start.

If you want to work with these files offline download howwierd.zip
</warning>

< the files >

recipe.xml is a working sample which requires recipe.dtd and recipe.xsl. The three files should be in the same directory. There is no recipe entered in this document. Viewing it in IE5 will show the results the transformation without data in the xml document. View the source to see the actual xml.

brownie.xml will show the results of a transformation with data in the xml document. This file also requires recipe.dtd and recipe.xsl.

recipe.dtd is a dtd that works with recipe.xml and brownie.xml.

recipe.xsl transforms recipe.xml or brownie.xml to html with style.

recipe_notes.xml will display in IE5 the same as recipe.xml but if you look at the source there are comments which may be helpful.

brownie.htm is the result of transforming brownie.xml to html. Manipulation of xml documents requires a parser. Making this document required software capable of saving transformations.

howwierd.zip is a zip file which contains all the files above. Unzip these files into a directory of their own and open readme.htm in IE 5.

< recipe.dtd>

<!ELEMENT recipe (title, author, category, description, ingredients, directions, yield)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ELEMENT prepare_time (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT ingredients (item+)>
<!ELEMENT item (#PCDATA)>
<!ELEMENT ingredient (#PCDATA)>
<!ELEMENT directions (step*)>
<!ELEMENT step (#PCDATA)>
<!ELEMENT yield (#PCDATA)>

< /recipe.dtd>

< recipe.xsl>

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
   <xsl:apply-templates />
</xsl:template>

<xsl:template match="/">
<html>
 <head>
  <title>HowWierd-Recipe</title>
<style type="text/css">
body { font-family: Verdana, Arial, Helvetica, sans-serif; 
       font-size: 12pt; background-color: #ffffff;}
a:active { font-family: Verdana, Arial, Helvetica, sans-serif; 
           font-size: 11pt; color: #FF00FF; text-decoration: none}
a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; 
          font-size: 11pt; color: #000033; text-decoration: none}
a:link { font-family: Verdana, Arial, Helvetica, sans-serif; 
         font-size: 11pt; color: #0000FF; text-decoration: none}
a:visited { font-family: Verdana, Arial, Helvetica, sans-serif; 
            font-size: 11pt; color: #999999; text-decoration: none}
h3: {font-size: 1.5em}
</style>
 </head>
   <body >
     <xsl:apply-templates />
   </body>
</html>
</xsl:template>

<xsl:template match="recipe">
<p>< <b>HowWierd XML files</b>
 url="http://howwierd.tripod.com"> <br/>
   <links> <a href="http://howwierd.tripod.com">
   home</a> | 
   <a href="https://howwierd.tripod.com/the%20files.htm">
   the files</a> | 
   <a href="https://howwierd.tripod.com/thoughts.htm">
   thoughts</a> | 
   <a href="http://howwierd.tripod.comresources.htm"> 
    xml resources </a> </links><br/></p>
<p align="right">
<a href="http://howwierd.tripod.com">
HowWierd XML Files</a> | 
<a href="mailto:howwierd@netzero.com">
Email HowWierd</a>
</p> 
<p style="font-size: 1.25em">
   <span style="font-size: 1.2em">       
     <xsl:value-of select="title" /></span> 
</p>		
      <p>
         <b>Author:</b>  
         <xsl:value-of select="author" /><br/>         
       <b>Category:</b>  
       <xsl:value-of select="category" /><br/>
      </p>
<xsl:apply-templates />
     
</xsl:template>

    <xsl:template match="description">		
      <p>		
       <xsl:value-of/>        
      </p> 
      <xsl:apply-templates /> 
    </xsl:template>


<xsl:template match="ingredients">

<h3>Ingredients:</h3>
<p>
        <xsl:for-each select="item">
  		<xsl:value-of/><br/>		
		</xsl:for-each>
</p>

</xsl:template>


<xsl:template match="directions">

<h3>Directions:</h3 >
   
<p><ol>
        <xsl:for-each select="step">
  		<li><xsl:value-of/></li>
		</xsl:for-each>
  </ol>
</p>
</xsl:template>

<xsl:template match="yield">



<p>
  <b>Yield:</b>
   <xsl:value-of/><br/>
</p>
<p>
<a href="http://howwierd.tripod.com">
http://howwierd.tripod.com</a> | 
<a href="mailto:howwierd@netzero.com">
howwierd@netzero.com</a><br/>
<br/>
<links> <a href="http://howwierd.tripod.com">
home</a> | 
<a href="https://howwierd.tripod.com/the%20files.htm">
the files</a> | 
<a href="https://howwierd.tripod.com/thoughts.htm">
thoughts</a> | 
<a href="http://howwierd.tripod.comresources.htm">
xml resources </a> </links><br/>
< <b>/HowWierd XML files</b>> <br/>
</p>      
</xsl:template>
   
</xsl:stylesheet>

< /recipe.xsl>

< /the files>

< notes>

Experiment with putting some data into recipe.xml and save your work as an xml file in the same directory the recipe.dtd and recipe.xsl files are in. You can then view the XML file created in IE5. If you make any mistakes (XML has lots of rules) IE5 will not display the document but will give you clues as to your mistake.

</notes>

<email> howwierd@mail.com</email>
<links> home | thoughts | xml resources </links>

</HowWierd XML files>