If the parser is able to tell us that "The prefix 'my' has not been mapped
to any URI ...", couldn't it also assume that the : in this case is part of
the name and throw a warning to that effect instead of an error?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 11:49 AM
To: [EMAIL PROTECTED]
Subject: Re: colon in the attribute's name



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]





======================= Confidentiality Statement ======================= 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
===================== End Confidentiality Statement =====================  



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to