Lists Home |
Date Index |
- From: Newsha Makooi <Newsha@imrgold.com>
- To: email@example.com
- Date: Tue, 15 Aug 2000 16:15:11 -0600
Title: Empty nodes and xsl:for-each select
I am writing in regards to the output table on page 523 of Michael Kay's XSLT, Programmer's Reference.
In the example XML document, the score value is an attribute of the element. Let's just say that instead of using attributes to hold the score value we used a <Score>2</Score> element for each <Team>Brazil</Team>
Now, let's say that some of these <Score>2</Score> elements were empty, as in <Score></Score>. How would you go about building a table, creating an empty cell for your output table based on an empty <Score></Score> value?
<xsl:for-each select="Team/Score" order-by="+ Name">
and this causes the table cells not to match up with the table headings, because of the selection part. You see, the empty <Score></Score> elements are not even selected. This is a problem since the values are not displayed accurately.
Any <suggestions/>? Please advise.