Subject:Stylus and default namespaces (BUG) - repeat Author:Dan Vint Date:02 May 2000 05:43 PM
Let's try this again with the HTML turned off!
I've come across an interesting problem in Stylus/XT. I'm trying to process the schema from the schema spec with XT and generate some HTML documentation. This schema has the following top element:
Note the default namespace => xmlns="http://www.w3.org/1999/XMLSchema"
My style sheet as follows:
produces no output in XT but does in Stylus. I've declared the same document namespace in the stylesheet as appears in the document, but it doesn't seem to apply to the elements in the template match statement that follows in XT.
If I provide a prefix as follows:
I then get the output of the word "test" as would be expected from XT.
Now the previous version of the stylesheet works with eXcelon's Stylus product and it seems to be supporting namespaces because it complains if it sees a prefix that hasn't been defined.
from xslt spec section 4. Expressions:
the set of namespace declarations are those in scope on the element which has the attribute in which the expression occurs; this includes the implicit declaration of the prefix xml required by the the XML Namespaces Recommendation [XML Names]; the default namespace (as declared by xmlns) is not part of this set
The last piece/clause seems to be where the difference between the two processors comes into play with XT being correct.
Dan Vint Lexica LLC
Sr XML Analyst (415)901-3623