129 |
package Message::DOM::Document; |
package Message::DOM::Document; |
130 |
|
|
131 |
sub create_processing_instruction ($$$) { |
sub create_processing_instruction ($$$) { |
132 |
|
if (${$_[0]}->{strict_error_checking}) { |
133 |
|
my $xv = $_[0]->xml_version; |
134 |
|
if (defined $xv) { |
135 |
|
if ($xv eq '1.0' and |
136 |
|
$_[1] =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/) { |
137 |
|
# |
138 |
|
} elsif ($xv eq '1.1' and |
139 |
|
$_[1] =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/) { |
140 |
|
# |
141 |
|
} else { |
142 |
|
report Message::DOM::DOMException |
143 |
|
-object => $_[0], |
144 |
|
-type => 'INVALID_CHARACTER_ERR', |
145 |
|
-subtype => 'MALFORMED_NAME_ERR'; |
146 |
|
} |
147 |
|
} |
148 |
|
} |
149 |
|
|
150 |
return Message::DOM::ProcessingInstruction->____new (@_[0, 1, 2]); |
return Message::DOM::ProcessingInstruction->____new (@_[0, 1, 2]); |
151 |
} # create_processing_instruction |
} # create_processing_instruction |
152 |
|
|