Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Creating a table within a XSL-stylesheet >Thread Next - Re: Creating a table within a XSL-stylesheet RE: Creating a table within a XSL-stylesheetTo: NULL Date: 12/2/2004 10:27:00 AM can you post your xml? "Tessie Sweden" wrote: > Hi! > > A table is supposed to be created inside the <body>-tags, correct? > Mine is displayed, but all of it's contents ends up OUTSIDE the table: > > http://www.student.nada.kth.se/~u1j80hrt/2D1517/XMLprojekt/recept.php > > I think it is a problem with "<xsl:apply-templates > select="ingredients"/>" on line 15. I don't know where to put it > really :)If I remove that line, everything goes away! > > This is my XSL-stylesheet: > ****************************************************************** > <xsl:template match="cookbook"> > <html> > <head> > <title> > <xsl:apply-templates select="title"/> > </title> > </head> > <body> > <h1>Recipe:</h1> > <ul> > <xsl:apply-templates select="recipe"/> > </ul> > <h1>Ingredients:</h1> > > <xsl:apply-templates select="ingredients"/> > > <table border="1"> > <tr bgcolor="#ffffff"> > <th>Amount</th> > <th>Unit</th> > <th>Ingredient</th> > </tr> > <xsl:for-each select="ingredients/recipe_id"> > <tr> > <td><xsl:value-of select="amount"/></td> > <td><xsl:value-of select="unit"/></td> > <td><xsl:value-of select="ingredient"/></td> > </tr> > </xsl:for-each> > </table> > </body> > </html> > </xsl:template> > > <xsl:template match="recipe"> > <li> > <xsl:apply-templates select="recipe_name"/> > <xsl:text>. </xsl:text> > <xsl:apply-templates select="type"/> > <xsl:text>. </xsl:text> > <xsl:apply-templates select="chef"/> > <xsl:text>. </xsl:text> > <xsl:apply-templates select="description"/> > </li> > </xsl:template> > > <xsl:template match="cookbook/ingredients/amount"> > <xsl:apply-templates /> > </xsl:template> > > <xsl:template match="cookbook/ingredients/unit"> > <xsl:apply-templates /> > </xsl:template> > > <xsl:template match="cookbook/ingredients/ingredient"> > <xsl:apply-templates /> > </xsl:template> > > </xsl:stylesheet> > ********************************************************************* > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
