I can't see anything immediately wrong with your code. Your expression
is equivalent to Sam's
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.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference