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]

Reply via email to