>>
>> I know why its happening but I don't necessarily agree with it. I'm not
>> sure if its explicitly said in the NS spec, but there are some standard
>> tests which consider it an error to have the root element be in anything
>> other than the global namespace if there is a DTD and namespaces are
>> enabled.
>
>So what would be the identifier in the DTD if it's not the root element?
>I'm not sure I agree with this either - it is certainly counter-intuitive!
>

In effect, if you turn on namespaces and have a DOCTYPE line, you just
cannot have any prefix on the root element, at least going by the logic
that is curently implemented in

>>
>> I personally disagree with this, and haven't implemented this in the C++
>> parser yet. Mainly it was due to the fact that I didn't have time to dig
>> into the reasons behind it and other things were more important. My
>> personal belief is that all DTD oriented stuff is lexical only, and
hence
>> the matching of the root element to the DOCTYPE element should be
lexical
>> as well.
>
>So I guess my question is how do I do what I suggested (have a
>namespace-enabled document validated by a DTD)?
>

Well, to be technical about it, you never validate a namespace enabled
document with a DTD. You validate the lexical representation of that
document, but the actual 'namespaceized' version of the document cannot be
validated by a DTD. So though the lexical token "foo:bar" really represents
{http://wwwfoobar.com/something}bar, all that the DTD can do is make sure
that something called literally "foo:bar" is there.

Given that the DTD process is completely lexical in terms of names, it
makes sense to me that the testing of the root element against the element
in the DOCTYPE line should be purely lexical as well. Particularly, given
than most people writing namespace oriented documents would want to have
the root element in a non-global namespace, it makes even more sense.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]


Reply via email to