Why?
This bug: http://www.mail-archive.com/xalan-dev@xml.apache.org/msg23493.html
The bug appears in jdk 1.5.0. The design decision to make qname prefixes reassignable remains a major problem for tool correctness.
How?
If you are going to drop the current opacity of qname prefixes such as xsl and go to a java package naming scheme you also need a "uses" statement. com.w3.xsl would be cumbersome to type everwhere, so all or part of the namespace must become implicit with either a "using com.w3" or using "com.w3.xsl" statement.
We can't do this in a straightforward way with attributes because attributes can't be repeated. <Foo xml:uses="com.w3" xml:uses="com.example"/> will not work. Sub-elements aren't good unless they apply to their parent node (otherwise there wouldn't be a way to assign namespaces to the root node of your document).
Is the sub-element applying to parent element the best approach?
Benjamin.
|