[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: I need to make sure that all namespace declaration
At 09:14 AM 3/22/2007, Ken wrote:
At 2007-03-22 13:51 +0100, bryan rasmussen wrote:I have a situation where the processor is obviously optimising namespace creation and placing them all over the place, unfortunately I need to place them exactly on a particular element. Exactly. To "promote" the declaration in this way would be actually to alter the model, albeit in a subtle way, of the result. When I've had to do the opposite -- get all namespaces declared at the top (this has generally been only for cosmetic reasons, but cosmetic reasons can be important to certain classes of users) -- I've done it by explicitly copying namespace nodes found further down to the top of the tree. Typically this is done in a completely separate transform in a pipeline (and typically the last one in the pipeline), since strictly speaking it relies on features in the serializer (regarding assignment of prefixes to namespaces), which is outside the proper purview of XSLT and pushes its boundaries. I've done this to address the requirement even though I don't like it: namespace nodes give me headaches, and as others have posted, it should be unnecessary. So it seems like a good procedure to quarantine. Namespaces are pesky and problematic because they're "meta". They're not markup, they're markup of the markup. I can see why their designers liked them, and they do handle certain classes of problems well. But they're also exactly the kind of trickiness that makes for problems down the line: too smart. Their subtleties (URIs pressed into service as globally unique identifiers?), and the way they refuse to stay on either side of the model vs representation divide (which is the real thing: the tree or the tag?), create confusion and misleading impressions, and thus what Mike just called "appalling design flaws". Which lead to more problems. Cheers, Wendell
|
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
|