RE: Find the root element from an attribute node
> OK. So none of these work - and why not? Do I really have to > assign a namespace? If your source document is in a namespace, then you must refer to its elements by that namespace. > > Is there a way to say "any namespace"? Why isn't that the default? > The namespace is part of the name. Saying "any namespace" would be like saying "anyone called Dave, don't care about the surname". That's fine so long as your stylesheet never strays further than your own little closed world, but if it's going to have wider exposure then you can't afford to be so parochial. Or to take another analogy, it's like publishing your phone number without an international dialling code. By doing that, you are saying that you're not expecting anyone outside your own country to want to talk to you. What you can do in XSLT 2.0 is to say xpath-default-namespace="....". That means that unprefixed names refer to a specific namespace, rather than to names in no namespace. Michael Kay http://www.saxonica.com/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format