Is namespace processing enabled? If so, I disagree with you. How is the
parser supposed to figure out that you don't want "my:name" to be a QName?
And what about the first part of the sentence that you've highlighted:
"Therefore, authors should not use the colon in XML names except for
namespace purposes"
That seems pretty clear to me -- if you want namespace processing, then you
get namespace processing. Since an attribute name is a QName when doing
namespace-aware parsing, it's an error.
Dave
"Peter A.
Volchek" To: "Xerces"
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED] cc: (bcc: David N Bertoni/CAM/Lotus)
m.od.ua> Subject: colon in the attribute's name
06/12/2001
11:25 AM
Please
respond to
xerces-c-dev
Let's parse two xml documents.
1.
<A xmlns:my="http://my.http" my:name="Peter"/>
This is parsed w/o errors. Prefix my is mapped to http://my.http, so all is
fine
2.
<A my:name="Peter"/>
The parser throws the following error:
[The prefix 'my' has not been mapped to any URI ( line 1, char 21 )]
But, in this case the colon ":" is part of attribute name rather then
namespace quailified name.
Let's look at xml rec http://www.w3.org/TR/REC-xml#NT-Name
.........
Note:
The Namespaces in XML Recommendation [XML Names] assigns a meaning to names
containing colon characters. Therefore, authors should not use the colon in
XML names except for namespace purposes,
but XML processors must accept the colon as a name character.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
..........
So, I guess, there should be no error.
Ideas?
Peter A. Volchek
Software Engineer
Metis International, Inc.
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]