diff Lib/IMPL/DOM/Schema/NodeList.pm @ 236:2904da230022

DOM refactoring
author sergey
date Mon, 15 Oct 2012 04:23:01 +0400
parents d1676be8afcc
children b8c724f6de36
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Schema/NodeList.pm	Fri Oct 12 02:08:51 2012 +0400
+++ b/Lib/IMPL/DOM/Schema/NodeList.pm	Mon Oct 15 04:23:01 2012 +0400
@@ -38,11 +38,11 @@
         while ($info and not $info->{anyNode} and $info->{nodeName} ne $child->nodeName) {
             # if possible of course :)
             return new IMPL::DOM::Schema::ValidationError (
-                Message => $this->messageUnexpected,
-                Node => $child,
-                Parent => $node,
-                Schema => $info->{Schema},
-                Source => $sourceSchema
+                message => $this->messageUnexpected,
+                node => $child,
+                parent => $node,
+                schema => $info->{Schema},
+                source => $sourceSchema
             ) if $info->{Min} > $info->{Seen};
             
             $info = shift @nodes;
@@ -50,10 +50,10 @@
         
         # return error if no more children allowed
         return new IMPL::DOM::Schema::ValidationError (
-            Message => $this->messageUnexpected,
-            Node => $child,
-            Parent => $node,
-            Source => $sourceSchema
+            message => $this->messageUnexpected,
+            node => $child,
+            parent => $node,
+            source => $sourceSchema
         ) unless $info;
         
         # it's ok, we found schema element for child
@@ -72,22 +72,21 @@
         
         # check count limits
         return new IMPL::DOM::Schema::ValidationError (
-            Error => 1,
-            Message => $this->messageUnexpected,
-            Node => $child,
-            Parent => $node,
-            Source => $sourceSchema,
+            message => $this->messageUnexpected,
+            node => $child,
+            parent => $node,
+            source => $sourceSchema,
         ) if $info->{Max} and $info->{Seen} > $info->{Max};
     }
     
     # no more children left (but may be should :)
     while ($info) {
         return new IMPL::DOM::Schema::ValidationError (
-            Error => 1,
-            Message => $this->messageNodesRequired,
-            Source => $sourceSchema,
-            Parent => $node,
-            Schema => $info->{Schema}
+            error => 1,
+            message => $this->messageNodesRequired,
+            source => $sourceSchema,
+            parent => $node,
+            schema => $info->{Schema}
         ) if $info->{Seen} < $info->{Min};
         
         $info = shift @nodes;