View Single Post
  #4 (permalink)  
Old July 29th, 2008, 09:29 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

Various strategies are possible:

(a) you can define a template rule that matches either of these element names (match="A|B")

(b) you can define two different template rules for the two different element names (it doesn't matter if one of the rules is unused)

(c) you can define two separate stylesheets for the two document types, with the common code that they share included into both using xsl:import.

Option (c) is probably the one that gives you most flexibility in the future.

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