View Single Post
  #5 (permalink)  
Old June 3rd, 2008, 12:08 PM
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

I can't see anything immediately wrong with your code. Your expression

<xsl:if test="./n1:section/n1:templateId/@root='2.16.840.1.113883.10.20.1.8'">

is equivalent to Sam's

test="./n1:section/n1:templateId[@root='2.16.840.1.113883.10.20.1.8']">

When you're dealing with a schema as complex as these healthcare vocabularies, there can be a lot of benefit in the XSLT 2.0 feature of writing schema-aware stylesheets. If you get into the habit of using schema-aware types in your match patterns and variable declarations, a lot of coding mistakes will be reported at compile time that otherwise take hours of run-time debugging.


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