My personal preference in this situation is to preprocess the un-namespaced documents to add the namespace, then use the same transformation on both. This is an example of the general approach called "pipeline processing", and its major benefits are that it maximizes reuse and minimizes complexity. Your stylesheet that adds the namespace is a simple module that can be used in many different pipelines; your main transformation is simpler because it isn't trying to do two jobs at once.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|