I think you are wrong. I think that the namespace spec very definitely says
that once namespace processing is turned on, colons in a name very
specifically mean that a prefix is being used. And it means that you can now
only have one colon in a name, and that some names cannot have any colons in
them anymore (because those types of names don't live in namespaces.)

So the parser is doing the right thing in this case, unless I'm just
completely missing something in the namespace spec, or its changed since I
implemented this stuff. If namespaces are on, the the DOM for instance,
would not be able to legally process the document if we just let slide any
prefixes that we couldn't fine defined. What namespace would we put them in?
They have to be in either the global namespace (which implies that they had
no prefix) orin some namespace, which implies that they will have a URL.

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]



-----Original Message-----
From: Perry A. Caro [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 12:44 PM
To: [EMAIL PROTECTED]
Subject: A different namespace issue, bug?


Here's a different namespace issue in Xerces-C.  Consider the following
simple input file:

<?xml version="1.0"?>
<doc>
    <first xlink:href="." />
    <second>some text</second>
    <third a="1">
        <fourth>Text</fourth>
        <fifth>
            <sixth a="1" b="2">
                <seventh a="1"/>
            </sixth>
        </fifth>
        <!-- comment -->
        <?pi ip?>
    </third>
</doc>

When I run this through the SAX2 parser interface for Xerces, with default
feature settings (which means namespace processing is on), I get the
following fatal error:

Fatal Error: The prefix 'xlink' has not been mapped to any URI#114 (3:29)

I believe this is an overzealous interpretation of the XML and Namespace
specs.  Just because an XML name has ":" in it does not mean it is a
qualified name in some namespace.

I believe a more correct intrepretation would be that if no matching xmlns
declaration can be found in the scope of the XML name, the name should be
treated as an unqualified ordinary name, just like "a" and "b" in the rest
of the sample.

Compromise: make it a Warning rather than a Fatal Error.

Perry

---------------------------------------------------------------------
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]

Reply via email to