[jdom-interest] Namespace issues, et al.
Malachi de AElfweald
malachi at tremerechantry.com
Tue Feb 25 22:18:53 PST 2003
Perhaps some of the confusion comes from the concept of validation.
When I see the <a> tag, I expect the dtd/xsd to specify how to interpret
that tag. In the same sense, I also expect it to specify how to interpret
the 'href' attribute, unless it is prefixed with a different namespace
(say, xhtml:href or html:href)...
I understand now that the namespace has nothing to do with the actual
dtd/xsd -- but I think that is where the confusion came from. I was seeing
the dtd/xsd as
defining the structure of that namespace (for example, the XHTML spec is
titled
the XHTML Namespace).... Thus, xhtml:href says that it is the 'href' as
defined
in the xhtml dtd, whereas html:href would say that it is the 'href' as
defined in
the html dtd....
Now, regardless of whether that logic is correct, incorrect, or somewhere
in-between -- I think that is where the confusion comes from.
Malachi
On Tue, 25 Feb 2003 11:20:54 -0700, Alex Rosen <arosen at novell.com> wrote:
> We're both trying to say the same thing here. Sorry if I wasn't clear.
>
> The XHTML spec could have said that you must ensure that your href
> attribute is in the null namespace (by using no prefix), or it could
> have said that you must ensure that your href attribute is in the XHTML
> namespace (by using a prefix). It chose to do the former, but it could
> have done either.
>
> But it's the XML spec that specifies that, if the attribute has no
> prefix, then it's in the null namespace, regardless of what namespace
> the parent element is in, and regardless of what the XHTML spec says.
>
> Alex
>
>>>> Elliotte Rusty Harold <elharo at metalab.unc.edu> 2/25/2003 11:29:46
> AM >>>
> At 9:09 AM -0700 2/25/03, Alex Rosen wrote:
>
>
>> (2) As someone mentioned, it's often up to the parent element to
> decide
>> how to interpret its attributes. The XHTML <a> element could either
>> specify that it has a child "href" in the null namespace or in the
> XHTML
>> namespace.
>
> No, XHTML can't do that. Please let's not confuse the issue further. The
> href attribute of the XHTML a element has no namespace name. There is no
> wiggle room on this. The XHTML spec cannot decide to do this one way or
> the other. The namespaces spec is authoritative on this point.
>
> The XHTML spec can say what browsers should do with href attributes of a
> elements, but if it wants the href attribute to be in the XHTML
> namespace, then it must assign a prefix to that attribute which is mapped
> to the XHTML namespace. It can't do this by fiat in the spec.
--
More information about the jdom-interest
mailing list