145 |
package Message::DOM::Document; |
package Message::DOM::Document; |
146 |
|
|
147 |
sub create_notation ($$) { |
sub create_notation ($$) { |
148 |
|
if (${$_[0]}->{strict_error_checking}) { |
149 |
|
my $xv = $_[0]->xml_version; |
150 |
|
if (defined $xv) { |
151 |
|
if ($xv eq '1.0' and |
152 |
|
$_[1] =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/) { |
153 |
|
# |
154 |
|
} elsif ($xv eq '1.1' and |
155 |
|
$_[1] =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/) { |
156 |
|
# |
157 |
|
} else { |
158 |
|
report Message::DOM::DOMException |
159 |
|
-object => $_[0], |
160 |
|
-type => 'INVALID_CHARACTER_ERR', |
161 |
|
-subtype => 'MALFORMED_NAME_ERR'; |
162 |
|
} |
163 |
|
} |
164 |
|
} |
165 |
|
|
166 |
return Message::DOM::Notation->____new (@_[0, 1]); |
return Message::DOM::Notation->____new (@_[0, 1]); |
167 |
} # create_notation |
} # create_notation |
168 |
|
|