View Single Post
  #4 (permalink)  
Old August 2nd, 2007, 09:13 AM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Well, your template for match="table" doesn't appear to do an apply-templates, and if it did, then it wouldn't match the template with match="table/thead" because the parent of your thead is a tgroup; and if you fixed that, then the
<xsl:if test="count(/table/thead/row)!='0'"> wouldn't be satisfied (it would throw a type error in 2.0 comparing an integer to a string, and if you fixed that, it would return false, because of the tgroup element); and if you fixed that, then the xsl:for-each wouldn't select anything, because your thead element does not have a child called table.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote