Handling Namespaces
Mostly what we've talked about in this chapter is how to perform some common transformation tasks. This section still deals with a situation you are very likely to encounter, but it deals strictly with XSLT care and feeding. We're talking about namespaces. Namespaces can be tricky any time you work with them, and XSLT is no exception. Fortunately, we can do a few things to keep ourselves out of too much trouble.
There are several key points to remember about namespaces. Your stylesheet, first and foremost, is still an XML document. To be well formed it must obey all the usual rules concerning namespace handling. The upshot to this is that namespace declarations need to be made at the appropriate scope within the document. ...
Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.