Tod Harter wrote:
Part of the problem here is that the SPEC is 'broken'. How do you select with XPath an element that is in a default namespace? There is no prefix you can place in the XPath statement!!! Your stuck! I had this problem with parsing some XHTML the other day where everything was in the default namespace. In XSLT you're template can specifiy the same namespace as the default and then IIRC you get a match, but what if you had to deal with multiple namespaces? The entire concept of default namespaces makes me grind my teeth. Its like autovivification of variables and hash keys in perl. Anyone designing XML processing systems DO NOT USE DEFAULT NAMESPACES, ever ever ever!

I'm sorry but this is condensed camel turd.


1) the spec isn't broken. XPath is a little language meant to be embedded in
another language, the latter providing context for it. Adding an inline
declarative method would be clunky, and if needed can be done by the host
language as is the case with XPointer.

2) You're not stuck. If you really need to do without something allowing you to
provide a context you can always do the local-name() and namespace-uri() game.
It may be ugly but it's there.

3) If you have multiple namespaces you can bind whatever prefix to each of them
and match properly in your XSLT, irrespective of what prefixes were used in the
document you're transforming. That's basic.

4) "Default namespaces" have nothing to do with auto-vivification. As I work on
infrastructural stuff, I probably get to see more XML vocabularies than most
people typically do. I have yet to encounter one area where people do not use
default namespaces. I know I do, always always always.

5) Venting uninformed opinions on multiple public lists isn't typically a nice idea.

--
Robin Berjon <[EMAIL PROTECTED]>
Research Engineer, Expway        http://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to