[XML-SIG] Element.localName, Attr.localName
Mike Brown
mike@skew.org
Sat, 17 Aug 2002 14:35:29 -0600 (MDT)
Uche Ogbuji wrote:
> >
> > Martin v. Loewis writes:
> > > > <doc xmlns:a="http://xml.python.org/a"
> > > > xmlns:A="http://xml.python.org/a"
> > > > xmlns:b="http://xml.python.org/b"
> > > > a:a="a" b:b="b"
> > > > />
> > > >
> > > > This is just XML 1.0, no namespaces!
> > >
> > > Why do you say that this document has no namespaces? It looks to me
> > > like it has!
> >
> > Because I've said this is only an XML 1.0 document only; it happens to
> > attributes that would be namespace declarations and prefixes if
> > namespace processing were active, but it isn't.
>
> Umm. Not so fast. This document is not XML 1.0 well-formed because attribute
> names starting with "xml" are reserved.
Bzzt. Names starting with "xml" are reserved, yes, but this is a semantic
reservation ("don't use it unless it's for the purpose we say it's for), not a
well-formedness constraint. The only constraint of the sort you are talking
about is on a processing instruction target. That is,
"<?xml foo?>"
is definitely not allowed, but
"<?xml-foo?>"
and
"<foo xml='bar'>"
are allowed.
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/