In article <c5nci5$l5a$00$>,
Ashmodai <> wrote:
% Patrick TJ McPhee scribbled something along the lines of:
% > And it isn't. _Every_ attribute is intepreted in the context of the
% > containing element -- not of its namespace, but of the element itself.
[...]
% > % Having a namespace or not should not be what makes an attribute local or
% > % global.
% Give me a break, you're saying the difference between a prefixed and an
% unprefixed attribute is that the prefixed one has a namespace and the
% unprefixed one does not, but both get interpreted in the context of the
% element?
What I'm really saying is that XML defines syntax, not processing. You say
that having a name space shouldn't be what makes an attribute global, and
I say that it doesn't -- the definition of XML has nothing to say on the
subject. You can process the data however you like without violating the
spec. Do whatever the hell you want. What XML says is that in this:
% So how does <x:foo x:bar="1" bar="2"/> have any reason to exist?
x:bar has a name space (presumably), while bar doesn't. Whether it has
any reason to exist depends entirely on what you're doing. I would never
have that, but that doesn't mean nobody would.
% What's the point of DTDs when working with namespaces?
They serve the same role as they do the rest of the time. The key to
having it work is to define the name space prefix as an entity, and
put all the definitions for each name space in its own file
<!-- x.dtd -->
<!ELEMENT %xpx;:foo EMPTY>
<!ATTRIBUTE %xpx;:foo %xpx;:bar CDATA #IMPLIED
bar CDATA #IMPLIED>
<!-- y.dtd -->
<!ENTITY % xpx "x">
<!ENTITY % x SYSTEM "x.dtd">
%x;
<!ELEMENT y (%xpx;:foo+)>
<!ATTRIBUTE y xmlns:%xpx; FIXED "http://www.x.org/xns">
% Isn't using French accents as quotation marks typographically incorrect
% -- or have I totally misread something?
There is no typographically correct way to specify quotation marks in
ascii. One lives within one's limitations.
--
Patrick TJ McPhee
East York Canada