ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
[PATCH] attribute namespace bug in XML::SAX::PurePerl
by Eric Prud'hommeaux other posts by this author
Oct 15 2005 11:22AM messages near this date
view in the new Beta List Site
Re: Trouble to load the XML::LibXML::Common module | Re: [PATCH] attribute namespace bug in XML::SAX::PurePerl
& XSLT oops,

Please report all bugs to the Perl-XML mailing list at perl-xml@[...].com.

indicates this should go here.

if namespace support is specifically disabled, ala

    $self-> {namespaceStream} = new XML::Validator::NamespaceStream(
                   XML::Validator::Schema::Parser-> new(schema => $self));
    my $parser = XML::SAX::ParserFactory-> parser(
                   Handler =>  $self->{namespaceStream});
    $parser-> set_feature('http://xml.org/sax/features/namespaces', 0);
    $parser-> parse_uri($self->{file});

the attribute code in PurePerl

            if ($self-> get_feature(Namespaces)) {
                ($ns, $prefix, $lname) = $self-> {NSHelper}->process_attribute_name($name);
		    }
            $ns ||= ''; $prefix ||= ''; $lname ||= '';
            $attrib_hash{"{$ns}$lname"} = {
            ...

produces one attrib_hash entry called '{}'.


--- /tmp/ediff5032RBB	 Sat Oct 15 19:02:50 2005
+++ /tmp/PurePerl.pm5032eLH  Sat Oct 15 19:02:50 2005
@@ -204,8 +204,10 @@
             my ($ns, $prefix, $lname);
             if ($self-> get_feature(Namespaces)) {
                 ($ns, $prefix, $lname) = $self-> {NSHelper}->process_attribute_name($name);
+            } else {
+	       $lname = $name;
	     }
-            $ns ||= ''; $prefix ||= ''; $lname ||= '';
+            $ns ||= ''; $prefix ||= '';
             $attrib_hash{"{$ns}$lname"} = {
                 Name =>  $name,
                 LocalName =>  $lname,

BTW: if anyone knows a better way to resolve namespaced attribute
values, let me know.

-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.
Attachments:
signature.asc
unknown1
unknown2
unknown3

Thread:
Eric Prud'hommeaux
Bjoern Hoehrmann
Eric Prud'hommeaux

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved