250 |
package Message::DOM::Document; |
package Message::DOM::Document; |
251 |
|
|
252 |
sub create_general_entity ($$) { |
sub create_general_entity ($$) { |
253 |
|
if (${$_[0]}->{strict_error_checking}) { |
254 |
|
my $xv = $_[0]->xml_version; |
255 |
|
if (defined $xv) { |
256 |
|
if ($xv eq '1.0' and |
257 |
|
$_[1] =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/) { |
258 |
|
# |
259 |
|
} elsif ($xv eq '1.1' and |
260 |
|
$_[1] =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/) { |
261 |
|
# |
262 |
|
} else { |
263 |
|
report Message::DOM::DOMException |
264 |
|
-object => $_[0], |
265 |
|
-type => 'INVALID_CHARACTER_ERR', |
266 |
|
-subtype => 'MALFORMED_NAME_ERR'; |
267 |
|
} |
268 |
|
} |
269 |
|
} |
270 |
|
|
271 |
return Message::DOM::Entity->____new (@_[0, 1]); |
return Message::DOM::Entity->____new (@_[0, 1]); |
272 |
} # create_general_entity |
} # create_general_entity |
273 |
|
|