diff -Naur namespace/XML-Validator-Schema/Schema/Library.pm XML-Validator-Schema/Schema/Library.pm
--- namespace/XML-Validator-Schema/Schema/Library.pm	2006-02-01 16:07:32.000000000 -0800
+++ XML-Validator-Schema/Schema/Library.pm	2006-02-03 02:28:51.000000000 -0800
@@ -69,8 +69,8 @@
     my $lname = $arg{name};
     my $ns;
     if (1 || $arg{parser}{qualified_elements}) { # !!! HACK
-	$lname =~ s!^\{([^\}]*)\}!!;
-	$ns = $1;
+	$lname =~ s/^\{([^\}]*)\}//;
+	$ns = $1 || '';
     } else {
 	$ns = XSD;
     }
diff -Naur namespace/XML-Validator-Schema/Schema/ModelNode.pm XML-Validator-Schema/Schema/ModelNode.pm
--- namespace/XML-Validator-Schema/Schema/ModelNode.pm	2005-10-22 06:06:45.000000000 -0700
+++ XML-Validator-Schema/Schema/ModelNode.pm	2006-02-03 02:30:06.000000000 -0800
@@ -63,6 +63,11 @@
     my $root = $self->mother;
 
     # the root will get assigned all the ElementNodes composing the model.
+    if (my $hs = $self->attributes->{'handles'}) {
+	foreach my $key (keys %$hs) {
+	    $root->attributes->{'handles'}{$key} = $hs->{$key};
+	}
+    }
     $root->clear_daughters;
 
     # get two regular expressions, one for verifying the final
diff -Naur namespace/XML-Validator-Schema/Schema/Parser.pm XML-Validator-Schema/Schema/Parser.pm
--- namespace/XML-Validator-Schema/Schema/Parser.pm	2006-02-01 16:22:46.000000000 -0800
+++ XML-Validator-Schema/Schema/Parser.pm	2006-02-03 02:31:45.000000000 -0800
@@ -24,11 +24,13 @@
 
     # start with a dummy root node and an empty stack of elements
     $self->{node_stack} = $self->{schema}{node_stack};
-    $self->{NSHelper} = XML::NamespaceSupport->new({xmlns => 1});
+    $self->{NSHelper} = $self->{schema}{NShelper} || XML::NamespaceSupport->new({xmlns => 1});
     $self->{qualified_elements} = 0;
     $self->{qualified_attributes} = 0;
     $self->{startANY} = 0;
     $self->{targetNamespace} = '';
+    $self->{inAppinfo} = 0;
+    $self->{appinfo_handler} = undef;
 
     return $self;
 }
@@ -71,6 +73,21 @@
     # @args: common arguments used for most calls
     my @args = ($data, $self->{schema}, $self);
 
+    if ($self->{inAppinfo} == 1) {
+	my $qualname = "{$namespace}$name";
+	$self->{appinfo_handler} = $self->{schema}{appinfo_handlers}{$qualname};
+	if (!$self->{appinfo_handler} && 0) {
+	    die "no handler for $qualname";
+	}
+    }
+    if ($self->{inAppinfo}) {
+	if ($self->{appinfo_handler}) {
+	    $self->{appinfo_handler}->start_element($data, $mother, $self->{NSHelper});
+	}
+	$self->{inAppinfo}++;
+	return;
+    }
+
     _err("W3C XML Schemas must be in the ".XSD." namespace (found $namespace).")
       if  $namespace && $namespace ne XSD && !$self->{inAppinfo};
 
@@ -255,7 +272,7 @@
     elsif ($name eq 'appinfo') {
 	croak("recursive appinfos not supported")
 	  if  $self->{inAppinfo};
-        $self->{inAppinfo} = @$node_stack;
+        $self->{inAppinfo} = 1;
     }
 
     else {
@@ -264,6 +281,26 @@
     }
 }
 
+sub characters {
+    my ($self, $data) = @_;
+    eval {
+	$self->characters1($data);
+    }; if ($@) {
+	$@ = $self->add_error_context($@);
+	die $@;
+    }
+}
+
+sub characters1 {
+    my ($self, $data) = @_;
+    if ($self->{appinfo_handler}) {
+	my $node_stack = $self->{node_stack};
+	my $mother = @$node_stack ? $node_stack->[-1] : undef;
+	$mother->attributes->{'handles'}{$mother} = $mother;
+	$self->{appinfo_handler}->characters($data, $mother, $self->{NSHelper});
+    }
+}
+
 sub end_element {
     my ($self, $data) = @_;
     eval {
@@ -280,6 +317,17 @@
     my $node = $node_stack->[-1];
     my $name = $data->{LocalName};
 
+    if ($self->{inAppinfo} > 1) {
+	$self->{inAppinfo}--;
+	if ($self->{appinfo_handler}) {
+	    $self->{appinfo_handler}->end_element($data, $node, $self->{NSHelper});
+	    if ($self->{inAppinfo} == 1) {
+		$self->{appinfo_handler} = undef;
+	    }
+	    return;
+	}
+    }
+
     # all done?
     if ($name eq 'schema') {
         _err("Module done broke, man.  That element stack ain't empty!")
