287 |
$self->{entity_token} = []; |
$self->{entity_token} = []; |
288 |
$self->{xml_version} = '1.0'; |
$self->{xml_version} = '1.0'; |
289 |
$self->{standalone} = false; |
$self->{standalone} = false; |
290 |
|
$self->{has_xref} = false; |
291 |
$self->{general_entity} = { |
$self->{general_entity} = { |
292 |
lt => {is_predefined => true}, |
lt => {is_predefined => true}, |
293 |
gt => {is_predefined => true}, |
gt => {is_predefined => true}, |
590 |
?lexmode DocumentMisc; |
?lexmode DocumentMisc; |
591 |
} |
} |
592 |
} else { |
} else { |
|
lang:Perl { |
|
|
$self->{standalone} = true; |
|
|
} |
|
593 |
?lexmode DocumentMisc; |
?lexmode DocumentMisc; |
594 |
} |
} |
595 |
|
|
2137 |
} |
} |
2138 |
} (Name) { |
} (Name) { |
2139 |
my $er; |
my $er; |
2140 |
lang:Perl ($name => $token.value) { |
lang:Perl ($name => $token.value) : has-error { |
2141 |
## TODO: Namespace well-formedness |
## TODO: Namespace well-formedness |
|
## TODO: Entity declared constraints |
|
2142 |
$er = $doc-><M::Document.createEntityReference> |
$er = $doc-><M::Document.createEntityReference> |
2143 |
($name); |
($name); |
2144 |
$parent-><M::Node.appendChild> ($er); |
$parent-><M::Node.appendChild> ($er); |
2145 |
push @{$self->{entity}}, <Code::getCopyOfEntityState:: |
|
2146 |
|
my $ent = $self->{general_entity}->{$name}; |
2147 |
|
if (not $ent) { # no entity declaration |
2148 |
|
if ($self->{standalone} or not $self->{has_xref}) { # WFC error |
2149 |
|
my $location; |
2150 |
|
__CODE{xp|get-location-from-token:: |
2151 |
|
$token => {$token}, |
2152 |
|
$result => {$location}, |
2153 |
|
}__; |
2154 |
|
my $continue = __DOMCore:ERROR{xp|wf-entity-declared:: |
2155 |
|
xp|error-token => {$token}, |
2156 |
|
c|location => {$location}, |
2157 |
|
xp|name => {$name}, |
2158 |
|
}__; |
2159 |
|
unless ($continue) { |
2160 |
|
__EXCEPTION{DOMLS|PARSE_ERR}__; |
2161 |
|
} |
2162 |
|
} # Otherwise VC error |
2163 |
|
push @{$self->{entity}}, <Code::getEmptyEntityState>; |
2164 |
|
|
2165 |
|
} else { # there IS entity declaration |
2166 |
|
if (($self->{standalone} or not $self->{has_xref}) and |
2167 |
|
$ent->{is_externally_declared} and |
2168 |
|
not $self->{entity}->[-1]->{is_externally_declared}) { |
2169 |
|
my $location; |
2170 |
|
__CODE{xp|get-location-from-token:: |
2171 |
|
$token => {$token}, |
2172 |
|
$result => {$location}, |
2173 |
|
}__; |
2174 |
|
my $continue = __DOMCore:ERROR{xp|wf-entity-declared:: |
2175 |
|
xp|error-token => {$token}, |
2176 |
|
c|location => {$location}, |
2177 |
|
xp|name => {$name}, |
2178 |
|
}__; |
2179 |
|
unless ($continue) { |
2180 |
|
__EXCEPTION{DOMLS|PARSE_ERR}__; |
2181 |
|
} |
2182 |
|
} |
2183 |
|
$er-><AS::x|EntityReference.isExpanded> |
2184 |
|
($ent->{has_replacement_text}); |
2185 |
|
push @{$self->{entity}}, <Code::getCopyOfEntityState:: |
2186 |
$entity_type = 'general_entity', |
$entity_type = 'general_entity', |
2187 |
$entity_name = $name>; |
$entity_name = $name>; |
2188 |
|
} |
2189 |
$self->{location} = $self->{entity}->[-1]; |
$self->{location} = $self->{entity}->[-1]; |
2190 |
push @{$self->{entity_token}}, $self->{token}; |
push @{$self->{entity_token}}, $self->{token}; |
2191 |
$self->{token} = []; |
$self->{token} = []; |
2259 |
## TODO: Entity declared constraints |
## TODO: Entity declared constraints |
2260 |
|
|
2261 |
$er = $self->{doc}-><M::Document.createEntityReference> ($name); |
$er = $self->{doc}-><M::Document.createEntityReference> ($name); |
2262 |
|
my $ent = $self->{general_entity}->{$name}; |
2263 |
push @{$vals->{nodes}}, $er; |
push @{$vals->{nodes}}, $er; |
2264 |
|
$er-><AS::x|EntityReference.isExpanded> |
2265 |
|
($ent->{has_replacement_text}); |
2266 |
push @{$self->{entity}}, <Code::getCopyOfEntityState:: |
push @{$self->{entity}}, <Code::getCopyOfEntityState:: |
2267 |
$entity_type = 'general_entity', |
$entity_type = 'general_entity', |
2268 |
$entity_name = $name>; |
$entity_name = $name>; |
2354 |
## TODO: Entity declared constraints |
## TODO: Entity declared constraints |
2355 |
|
|
2356 |
$er = $self->{doc}-><M::Document.createEntityReference> ($name); |
$er = $self->{doc}-><M::Document.createEntityReference> ($name); |
2357 |
|
my $ent = $self->{general_entity}->{$name}; |
2358 |
$parent-><M::Node.appendChild> ($er); |
$parent-><M::Node.appendChild> ($er); |
2359 |
|
$er-><AS::x|EntityReference.isExpanded> |
2360 |
|
($ent->{has_replacement_text}); |
2361 |
push @{$self->{entity}}, <Code::getCopyOfEntityState:: |
push @{$self->{entity}}, <Code::getCopyOfEntityState:: |
2362 |
$entity_type = 'general_entity', |
$entity_type = 'general_entity', |
2363 |
$entity_name = $name>; |
$entity_name = $name>; |
2463 |
&SystemLiteral ($decl => $decl); |
&SystemLiteral ($decl => $decl); |
2464 |
|
|
2465 |
~? (S) { } |
~? (S) { } |
2466 |
|
|
2467 |
|
lang:Perl { |
2468 |
|
$self->{has_xref} = true; |
2469 |
|
} |
2470 |
} (Name == 'SYSTEM') { |
} (Name == 'SYSTEM') { |
2471 |
~ (S) { } |
~ (S) { } |
2472 |
|
|
2473 |
&SystemLiteral ($decl => $decl); |
&SystemLiteral ($decl => $decl); |
2474 |
|
|
2475 |
~? (S) { } |
~? (S) { } |
2476 |
|
|
2477 |
|
lang:Perl { |
2478 |
|
$self->{has_xref} = true; |
2479 |
|
} |
2480 |
} |
} |
2481 |
} |
} |
2482 |
|
|
2499 |
|
|
2500 |
~? (S) { } |
~? (S) { } |
2501 |
} |
} |
|
|
|
|
// TODO: set $self->{standalone} true if only internal subset |
|
|
// with no param ref |
|
2502 |
|
|
2503 |
// ~ (MDC) { } |
// ~ (MDC) { } |
2504 |
} // _DocumentTypeDeclaration_ |
} // _DocumentTypeDeclaration_ |
2634 |
} (PERO) { |
} (PERO) { |
2635 |
?lexmode EntityReference; |
?lexmode EntityReference; |
2636 |
|
|
2637 |
|
lang:Perl { |
2638 |
|
$self->{has_xref} = true; |
2639 |
|
} |
2640 |
|
|
2641 |
~ (Name) { |
~ (Name) { |
2642 |
|
|
2643 |
} |
} |
3059 |
} |
} |
3060 |
} |
} |
3061 |
|
|
3062 |
|
/* |
3063 |
|
TODO: Set |$decl->{is_externally_declared}| flag |
3064 |
|
and |Entity.isExternallyDeclared| attribute |
3065 |
|
for entity declarations in external subset or |
3066 |
|
in parameter entity. |
3067 |
|
*/ |
3068 |
|
|
3069 |
~ (Name) { |
~ (Name) { |
3070 |
lang:Perl ($v => $token.value) { |
lang:Perl ($v => $token.value) { |
3071 |
$decl->{name} = $v; |
$decl->{name} = $v; |
3213 |
} |
} |
3214 |
} (PERO) { |
} (PERO) { |
3215 |
?lexmode EntityDeclaration; |
?lexmode EntityDeclaration; |
3216 |
|
|
3217 |
|
lang:Perl { |
3218 |
|
$self->{has_xref} = true; |
3219 |
|
} |
3220 |
|
|
3221 |
// TODO: Expand or wferror if internal subset |
// TODO: Expand or wferror if internal subset |
3222 |
|
|
3277 |
|
|
3278 |
lang:Perl { |
lang:Perl { |
3279 |
$decl->{reptxt} = \$reptxt; |
$decl->{reptxt} = \$reptxt; |
3280 |
|
$decl->{has_replacement_text} = true; |
3281 |
} |
} |
3282 |
} // _EntityValue |
} // _EntityValue |
3283 |
|
|
3298 |
} (PERO) { |
} (PERO) { |
3299 |
?lexmode EntityDeclaration; |
?lexmode EntityDeclaration; |
3300 |
|
|
3301 |
|
lang:Perl { |
3302 |
|
$self->{has_xref} = true; |
3303 |
|
} |
3304 |
|
|
3305 |
// TODO: implement this |
// TODO: implement this |
3306 |
~ (Name) { |
~ (Name) { |
3307 |
|
|
3359 |
|
|
3360 |
lang:Perl { |
lang:Perl { |
3361 |
$decl->{reptxt} = \$reptxt; |
$decl->{reptxt} = \$reptxt; |
3362 |
|
$decl->{has_replacement_text} = true; |
3363 |
} |
} |
3364 |
} // _EntityValueA |
} // _EntityValueA |
3365 |
|
|
5332 |
} |
} |
5333 |
element { |
element { |
5334 |
general-entity-reference { |
general-entity-reference { |
5335 |
|
is-expanded: true; |
5336 |
cdata-section { |
cdata-section { |
5337 |
data: 'text'; |
data: 'text'; |
5338 |
} |
} |
7062 |
node-name: 'b'; |
node-name: 'b'; |
7063 |
text { data: 'c'; } |
text { data: 'c'; } |
7064 |
general-entity-reference { |
general-entity-reference { |
7065 |
|
is-expanded: true; |
7066 |
node-name: 'ent'; |
node-name: 'ent'; |
7067 |
text-content: 'aa<bb'; |
text-content: 'aa<bb'; |
7068 |
} |
} |
7091 |
general-entity-reference { |
general-entity-reference { |
7092 |
node-name: 'ent'; |
node-name: 'ent'; |
7093 |
text-content: 'aa<bb'; |
text-content: 'aa<bb'; |
7094 |
|
is-expanded: true; |
7095 |
} |
} |
7096 |
} |
} |
7097 |
} |
} |
7105 |
general-entity-reference { |
general-entity-reference { |
7106 |
node-name: 'ent'; |
node-name: 'ent'; |
7107 |
text-content: 'aa<bb'; |
text-content: 'aa<bb'; |
7108 |
|
is-expanded: true; |
7109 |
} |
} |
7110 |
|
is-expanded: true; |
7111 |
} |
} |
7112 |
} |
} |
7113 |
} |
} |
7226 |
text { |
text { |
7227 |
data: 'entity value'; |
data: 'entity value'; |
7228 |
} |
} |
7229 |
|
is-expanded: true; |
7230 |
} |
} |
7231 |
} |
} |
7232 |
} |
} |
7260 |
text { |
text { |
7261 |
data: 'entity value'; |
data: 'entity value'; |
7262 |
} |
} |
7263 |
|
is-expanded: true; |
7264 |
} |
} |
7265 |
text { data: ' and '; } |
text { data: ' and '; } |
7266 |
general-entity-reference { |
general-entity-reference { |
7268 |
text { |
text { |
7269 |
data: 'entity value'; |
data: 'entity value'; |
7270 |
} |
} |
7271 |
|
is-expanded: true; |
7272 |
} |
} |
7273 |
} |
} |
7274 |
} |
} |
7308 |
local-name: 'a'; |
local-name: 'a'; |
7309 |
general-entity-reference { |
general-entity-reference { |
7310 |
node-name: 'entity'; |
node-name: 'entity'; |
7311 |
|
is-expanded: true; |
7312 |
text { |
text { |
7313 |
data: 'entity '; |
data: 'entity '; |
7314 |
} |
} |
7375 |
general-entity-reference { |
general-entity-reference { |
7376 |
node-name: 'entity2'; |
node-name: 'entity2'; |
7377 |
text { data: 'e'; } |
text { data: 'e'; } |
7378 |
|
is-expanded: true; |
7379 |
general-entity-reference { |
general-entity-reference { |
7380 |
node-name: 'entity1'; |
node-name: 'entity1'; |
7381 |
text { |
text { |
7382 |
data: 'entity value'; |
data: 'entity value'; |
7383 |
} |
} |
7384 |
|
is-expanded: true; |
7385 |
} |
} |
7386 |
text { data: 'n'; } |
text { data: 'n'; } |
7387 |
} |
} |
8229 |
general-entity-reference { |
general-entity-reference { |
8230 |
node-name: 'ent'; |
node-name: 'ent'; |
8231 |
text-content: '!'; |
text-content: '!'; |
8232 |
|
is-expanded: true; |
8233 |
} |
} |
8234 |
} |
} |
8235 |
} |
} |
8248 |
general-entity-reference { |
general-entity-reference { |
8249 |
node-name: 'ent'; |
node-name: 'ent'; |
8250 |
text-content: 'aaaaa!bbbbb'; |
text-content: 'aaaaa!bbbbb'; |
8251 |
|
is-expanded: true; |
8252 |
} |
} |
8253 |
} |
} |
8254 |
} |
} |
8270 |
general-entity-reference { |
general-entity-reference { |
8271 |
node-name: 'ent'; |
node-name: 'ent'; |
8272 |
text-content: '!'; |
text-content: '!'; |
8273 |
|
is-expanded: true; |
8274 |
} |
} |
8275 |
|
is-expanded: true; |
8276 |
} |
} |
8277 |
} |
} |
8278 |
} |
} |
8294 |
general-entity-reference { |
general-entity-reference { |
8295 |
node-name: 'ent'; |
node-name: 'ent'; |
8296 |
text-content: 'aa!bb'; |
text-content: 'aa!bb'; |
8297 |
|
is-expanded: true; |
8298 |
} |
} |
8299 |
|
is-expanded: true; |
8300 |
} |
} |
8301 |
} |
} |
8302 |
} |
} |
8317 |
general-entity-reference { |
general-entity-reference { |
8318 |
node-name: 'ent'; |
node-name: 'ent'; |
8319 |
text-content: '!'; |
text-content: '!'; |
8320 |
|
is-expanded: true; |
8321 |
} |
} |
8322 |
} |
} |
8323 |
} |
} |
8339 |
general-entity-reference { |
general-entity-reference { |
8340 |
node-name: 'ent'; |
node-name: 'ent'; |
8341 |
text-content: 'aaaaa!bbbbb'; |
text-content: 'aaaaa!bbbbb'; |
8342 |
|
is-expanded: true; |
8343 |
} |
} |
8344 |
} |
} |
8345 |
} |
} |
8361 |
node-name: 'a'; |
node-name: 'a'; |
8362 |
general-entity-reference { |
general-entity-reference { |
8363 |
node-name: 'ent2'; |
node-name: 'ent2'; |
8364 |
|
is-expanded: true; |
8365 |
general-entity-reference { |
general-entity-reference { |
8366 |
node-name: 'ent'; |
node-name: 'ent'; |
8367 |
text-content: '!'; |
text-content: '!'; |
8368 |
|
is-expanded: true; |
8369 |
} |
} |
8370 |
} |
} |
8371 |
} |
} |
8388 |
node-name: 'a'; |
node-name: 'a'; |
8389 |
general-entity-reference { |
general-entity-reference { |
8390 |
node-name: 'ent2'; |
node-name: 'ent2'; |
8391 |
|
is-expanded: true; |
8392 |
general-entity-reference { |
general-entity-reference { |
8393 |
node-name: 'ent'; |
node-name: 'ent'; |
8394 |
text-content: 'aa!bb'; |
text-content: 'aa!bb'; |
8395 |
|
is-expanded: true; |
8396 |
} |
} |
8397 |
} |
} |
8398 |
} |
} |
8528 |
general-entity-reference { |
general-entity-reference { |
8529 |
node-name: 'ent'; |
node-name: 'ent'; |
8530 |
text-content: '!'; |
text-content: '!'; |
8531 |
|
is-expanded: true; |
8532 |
} |
} |
8533 |
} |
} |
8534 |
} |
} |
8547 |
general-entity-reference { |
general-entity-reference { |
8548 |
node-name: 'ent'; |
node-name: 'ent'; |
8549 |
text-content: 'aaaaa!bbbbb'; |
text-content: 'aaaaa!bbbbb'; |
8550 |
|
is-expanded: true; |
8551 |
} |
} |
8552 |
} |
} |
8553 |
} |
} |
8566 |
element { |
element { |
8567 |
general-entity-reference { |
general-entity-reference { |
8568 |
node-name: 'ent2'; |
node-name: 'ent2'; |
8569 |
|
is-expanded: true; |
8570 |
general-entity-reference { |
general-entity-reference { |
8571 |
node-name: 'ent'; |
node-name: 'ent'; |
8572 |
text-content: '!'; |
text-content: '!'; |
8573 |
|
is-expanded: true; |
8574 |
} |
} |
8575 |
} |
} |
8576 |
} |
} |
8590 |
element { |
element { |
8591 |
general-entity-reference { |
general-entity-reference { |
8592 |
node-name: 'ent2'; |
node-name: 'ent2'; |
8593 |
|
is-expanded: true; |
8594 |
general-entity-reference { |
general-entity-reference { |
8595 |
node-name: 'ent'; |
node-name: 'ent'; |
8596 |
|
is-expanded: true; |
8597 |
text-content: 'aa!bb'; |
text-content: 'aa!bb'; |
8598 |
} |
} |
8599 |
} |
} |
8615 |
node-name: 'a'; |
node-name: 'a'; |
8616 |
general-entity-reference { |
general-entity-reference { |
8617 |
node-name: 'ent'; |
node-name: 'ent'; |
8618 |
|
is-expanded: true; |
8619 |
text-content: '!'; |
text-content: '!'; |
8620 |
} |
} |
8621 |
} |
} |
8637 |
node-name: 'a'; |
node-name: 'a'; |
8638 |
general-entity-reference { |
general-entity-reference { |
8639 |
node-name: 'ent'; |
node-name: 'ent'; |
8640 |
|
is-expanded: true; |
8641 |
text-content: 'aaaaa!bbbbb'; |
text-content: 'aaaaa!bbbbb'; |
8642 |
} |
} |
8643 |
} |
} |
8660 |
node-name: 'a'; |
node-name: 'a'; |
8661 |
general-entity-reference { |
general-entity-reference { |
8662 |
node-name: 'ent2'; |
node-name: 'ent2'; |
8663 |
|
is-expanded: true; |
8664 |
general-entity-reference { |
general-entity-reference { |
8665 |
node-name: 'ent'; |
node-name: 'ent'; |
8666 |
|
is-expanded: true; |
8667 |
text-content: '!'; |
text-content: '!'; |
8668 |
} |
} |
8669 |
} |
} |
8687 |
node-name: 'a'; |
node-name: 'a'; |
8688 |
general-entity-reference { |
general-entity-reference { |
8689 |
node-name: 'ent2'; |
node-name: 'ent2'; |
8690 |
|
is-expanded: true; |
8691 |
general-entity-reference { |
general-entity-reference { |
8692 |
node-name: 'ent'; |
node-name: 'ent'; |
8693 |
|
is-expanded: true; |
8694 |
text-content: 'aa!bb'; |
text-content: 'aa!bb'; |
8695 |
} |
} |
8696 |
} |
} |
8767 |
} |
} |
8768 |
} |
} |
8769 |
|
|
8770 |
|
@@XMLTest: |
8771 |
|
@@@QName: xp.element.content.ger.entity.declared.nodtd.1.test |
8772 |
|
@@@DEnt: |
8773 |
|
@@@@test:value: |
8774 |
|
<p>&entity;</p> |
8775 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (1, 4)..(1, 11); } |
8776 |
|
@@XMLTest: |
8777 |
|
@@@QName: xp.element.content.ger.entity.declared.nodtd.2.test |
8778 |
|
@@@DEnt: |
8779 |
|
@@@@test:value: |
8780 |
|
<?xml version="1.0" standalone="yes"?> |
8781 |
|
<p>&entity;</p> |
8782 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); } |
8783 |
|
@@XMLTest: |
8784 |
|
@@@QName: xp.element.content.ger.entity.declared.nodtd.3.test |
8785 |
|
@@@DEnt: |
8786 |
|
@@@@test:value: |
8787 |
|
<?xml version="1.0" standalone="no"?> |
8788 |
|
<p>&entity;</p> |
8789 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); } |
8790 |
|
@@XMLTest: |
8791 |
|
@@@QName: xp.element.content.ger.entity.declared.nodtd.-1.test |
8792 |
|
@@@DEnt: |
8793 |
|
@@@@test:value: |
8794 |
|
<p><>&"'</p> |
8795 |
|
@@@test:domTree: |
8796 |
|
document { |
8797 |
|
element { |
8798 |
|
text-content: '<>&"' U+0027; |
8799 |
|
} |
8800 |
|
} |
8801 |
|
@@XMLTest: |
8802 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.1.test |
8803 |
|
@@@DEnt: |
8804 |
|
@@@@test:value: |
8805 |
|
<!DOCTYPE p []> |
8806 |
|
<p>&entity;</p> |
8807 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); } |
8808 |
|
@@XMLTest: |
8809 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.2.test |
8810 |
|
@@@DEnt: |
8811 |
|
@@@@test:value: |
8812 |
|
<!DOCTYPE p [ |
8813 |
|
<!ENTITY other "aa"> |
8814 |
|
<!ENTITY % another "aa"> |
8815 |
|
]> |
8816 |
|
<p>&entity;</p> |
8817 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (5, 4)..(5, 11); } |
8818 |
|
@@XMLTest: |
8819 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.3.test |
8820 |
|
@@@DEnt: |
8821 |
|
@@@@test:value: |
8822 |
|
<?xml version="1.0" standalone="yes"?> |
8823 |
|
<!DOCTYPE p []> |
8824 |
|
<p>&entity;</p> |
8825 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); } |
8826 |
|
@@XMLTest: |
8827 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.4.test |
8828 |
|
@@@DEnt: |
8829 |
|
@@@@test:value: |
8830 |
|
<?xml version="1.0" standalone="no"?> |
8831 |
|
<!DOCTYPE p []> |
8832 |
|
<p>&entity;</p> |
8833 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); } |
8834 |
|
@@XMLTest: |
8835 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.5.test |
8836 |
|
@@@DEnt: |
8837 |
|
@@@@test:value: |
8838 |
|
<?xml version="1.0" standalone="yes"?> |
8839 |
|
<!DOCTYPE p [ |
8840 |
|
<!ENTITY other "aa"> |
8841 |
|
<!ENTITY % another "aa"> |
8842 |
|
]> |
8843 |
|
<p>&entity;</p> |
8844 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); } |
8845 |
|
@@XMLTest: |
8846 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.6.test |
8847 |
|
@@@DEnt: |
8848 |
|
@@@@test:value: |
8849 |
|
<?xml version="1.0" standalone="no"?> |
8850 |
|
<!DOCTYPE p [ |
8851 |
|
<!ENTITY other "aa"> |
8852 |
|
<!ENTITY % another "aa"> |
8853 |
|
]> |
8854 |
|
<p>&entity;</p> |
8855 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); } |
8856 |
|
@@XMLTest: |
8857 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.-1.test |
8858 |
|
@@@DEnt: |
8859 |
|
@@@@test:value: |
8860 |
|
<!DOCTYPE p [ |
8861 |
|
<!ENTITY entity "value"> |
8862 |
|
]> |
8863 |
|
<p>&entity;</p> |
8864 |
|
@@@test:domTree: |
8865 |
|
document { |
8866 |
|
document-type { |
8867 |
|
general-entity { |
8868 |
|
node-name: 'entity'; |
8869 |
|
text-content: 'value'; |
8870 |
|
} |
8871 |
|
} |
8872 |
|
element { |
8873 |
|
general-entity { |
8874 |
|
node-name: 'entity'; |
8875 |
|
text-content: 'value'; |
8876 |
|
} |
8877 |
|
} |
8878 |
|
} |
8879 |
|
@@XMLTest: |
8880 |
|
@@@QName: xp.element.content.ger.entity.declared.nopref.-2.test |
8881 |
|
@@@DEnt: |
8882 |
|
@@@@test:value: |
8883 |
|
<!DOCTYPE p [ |
8884 |
|
<!ENTITY entity "value"> |
8885 |
|
<!ENTITY another SYSTEM "another"> |
8886 |
|
]> |
8887 |
|
<p>&entity;</p> |
8888 |
|
@@@test:domTree: |
8889 |
|
document { |
8890 |
|
document-type { |
8891 |
|
general-entity { |
8892 |
|
node-name: 'entity'; |
8893 |
|
text-content: 'value'; |
8894 |
|
} |
8895 |
|
} |
8896 |
|
element { |
8897 |
|
general-entity { |
8898 |
|
node-name: 'entity'; |
8899 |
|
text-content: 'value'; |
8900 |
|
} |
8901 |
|
} |
8902 |
|
} |
8903 |
|
@@XMLTest: |
8904 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.1.test |
8905 |
|
@@@DEnt: |
8906 |
|
@@@@test:value: |
8907 |
|
<?xml version="1.0" standalone="yes"?> |
8908 |
|
<p>&entity;</p> |
8909 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); } |
8910 |
|
@@XMLTest: |
8911 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.2.test |
8912 |
|
@@@DEnt: |
8913 |
|
@@@@test:value: |
8914 |
|
<?xml version="1.0" standalone="yes"?> |
8915 |
|
<!DOCTYPE p []> |
8916 |
|
<p>&entity;</p> |
8917 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); } |
8918 |
|
@@XMLTest: |
8919 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.3.test |
8920 |
|
@@@DEnt: |
8921 |
|
@@@@test:value: |
8922 |
|
<?xml version="1.0" standalone="yes"?> |
8923 |
|
<!DOCTYPE p [ |
8924 |
|
<!ENTITY % para "<!-- -->"> |
8925 |
|
%para; |
8926 |
|
]> |
8927 |
|
<p>&entity;</p> |
8928 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); } |
8929 |
|
@@XMLTest: |
8930 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.-1.test |
8931 |
|
@@@DEnt: |
8932 |
|
@@@@test:value: |
8933 |
|
<?xml version="1.0" standalone="no"?> |
8934 |
|
<!DOCTYPE p [ |
8935 |
|
<!ENTITY % para "<!-- -->"> |
8936 |
|
%para; |
8937 |
|
]> |
8938 |
|
<p>&entity;</p> |
8939 |
|
@@@test:domTree: |
8940 |
|
document { |
8941 |
|
document-type { } |
8942 |
|
element { |
8943 |
|
general-entity-reference { |
8944 |
|
is-expanded: false; |
8945 |
|
} |
8946 |
|
} |
8947 |
|
} |
8948 |
|
@@XMLTest: |
8949 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.-2.test |
8950 |
|
@@@DEnt: |
8951 |
|
@@@@test:value: |
8952 |
|
<!DOCTYPE p [ |
8953 |
|
<!ENTITY % para "<!-- -->"> |
8954 |
|
%para; |
8955 |
|
]> |
8956 |
|
<p>&entity;</p> |
8957 |
|
@@@test:domTree: |
8958 |
|
document { |
8959 |
|
document-type { } |
8960 |
|
element { |
8961 |
|
general-entity-reference { |
8962 |
|
is-expanded: false; |
8963 |
|
} |
8964 |
|
} |
8965 |
|
} |
8966 |
|
@@XMLTest: |
8967 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.4.test |
8968 |
|
@@@DEnt: |
8969 |
|
@@@@test:value: |
8970 |
|
<?xml version="1.0" standalone="yes"?> |
8971 |
|
<!DOCTYPE p [ |
8972 |
|
<!ENTITY % para SYSTEM "para"> |
8973 |
|
%para; |
8974 |
|
]> |
8975 |
|
<p>&entity;</p> |
8976 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); } |
8977 |
|
@@XMLTest: |
8978 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.-3.test |
8979 |
|
@@@DEnt: |
8980 |
|
@@@@test:value: |
8981 |
|
<?xml version="1.0" standalone="no"?> |
8982 |
|
<!DOCTYPE p [ |
8983 |
|
<!ENTITY % para SYSTEM "para"> |
8984 |
|
%para; |
8985 |
|
]> |
8986 |
|
<p>&entity;</p> |
8987 |
|
@@@test:domTree: |
8988 |
|
document { |
8989 |
|
document-type { } |
8990 |
|
element { |
8991 |
|
general-entity-reference { |
8992 |
|
is-expanded: false; |
8993 |
|
} |
8994 |
|
} |
8995 |
|
} |
8996 |
|
@@XMLTest: |
8997 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.-4.test |
8998 |
|
@@@DEnt: |
8999 |
|
@@@@test:value: |
9000 |
|
<!DOCTYPE p [ |
9001 |
|
<!ENTITY % para SYSTEM "para"> |
9002 |
|
%para; |
9003 |
|
]> |
9004 |
|
<p>&entity;</p> |
9005 |
|
@@@test:domTree: |
9006 |
|
document { |
9007 |
|
document-type { } |
9008 |
|
element { |
9009 |
|
general-entity-reference { |
9010 |
|
is-expanded: false; |
9011 |
|
} |
9012 |
|
} |
9013 |
|
} |
9014 |
|
@@XMLTest: |
9015 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.5.test |
9016 |
|
@@@DEnt: |
9017 |
|
@@@@test:value: |
9018 |
|
<?xml version="1.0" standalone="yes"?> |
9019 |
|
<!DOCTYPE p SYSTEM "dtd"> |
9020 |
|
<p>&entity;</p> |
9021 |
|
@@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); } |
9022 |
|
@@XMLTest: |
9023 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.-5.test |
9024 |
|
@@@DEnt: |
9025 |
|
@@@@test:value: |
9026 |
|
<?xml version="1.0" standalone="no"?> |
9027 |
|
<!DOCTYPE p SYSTEM "dtd"> |
9028 |
|
<p>&entity;</p> |
9029 |
|
@@@test:domTree: |
9030 |
|
document { |
9031 |
|
document-type { } |
9032 |
|
element { |
9033 |
|
general-entity-reference { |
9034 |
|
is-expanded: false; |
9035 |
|
} |
9036 |
|
} |
9037 |
|
} |
9038 |
|
@@XMLTest: |
9039 |
|
@@@QName: xp.element.content.ger.entity.declared.standalone.-6.test |
9040 |
|
@@@DEnt: |
9041 |
|
@@@@test:value: |
9042 |
|
<!DOCTYPE p SYSTEM "dtd"> |
9043 |
|
<p>&entity;</p> |
9044 |
|
@@@test:domTree: |
9045 |
|
document { |
9046 |
|
document-type { } |
9047 |
|
element { |
9048 |
|
general-entity-reference { |
9049 |
|
is-expanded: false; |
9050 |
|
} |
9051 |
|
} |
9052 |
|
} |
9053 |
|
|
9054 |
|
@@enImplNote: |
9055 |
|
{TODO:: Entity declared WFC for |
9056 |
|
|
9057 |
|
- General entity references in attribute value literals in tags |
9058 |
|
|
9059 |
|
- General entity references in attribute value literals in |
9060 |
|
attlist declarations |
9061 |
|
|
9062 |
|
- General entity references in replacement texts referenced |
9063 |
|
in element contents |
9064 |
|
|
9065 |
|
- General entity references in replacement texts referenced |
9066 |
|
in attribute value literals in tags |
9067 |
|
|
9068 |
|
- General entity references in replacement texts referenced |
9069 |
|
in attribute value literals in attlist declarations |
9070 |
|
|
9071 |
|
} |
9072 |
|
|
9073 |
@@PerlDef: |
@@PerlDef: |
9074 |
my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({ |
my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({ |
9075 |
'Core' => '3.0', |
'Core' => '3.0', |
9150 |
} |
} |
9151 |
|
|
9152 |
@ResourceDef: |
@ResourceDef: |
9153 |
|
@@QName: getEmptyEntityState |
9154 |
|
@@rdf:type: DISPerl|InlineCode |
9155 |
|
@@ForCheck: ManakaiDOM|ForClass |
9156 |
|
@@PerlDef: |
9157 |
|
{reptxt => \'', line => 1, column => 1, pos => 0, |
9158 |
|
is_externally_declared => true} |
9159 |
|
|
9160 |
|
@ResourceDef: |
9161 |
@@QName: getCopyOfEntityState |
@@QName: getCopyOfEntityState |
9162 |
@@rdf:type: DISPerl|InlineCode |
@@rdf:type: DISPerl|InlineCode |
9163 |
@@ForCheck: ManakaiDOM|ForClass |
@@ForCheck: ManakaiDOM|ForClass |
9469 |
The parent node in which the character reference has |
The parent node in which the character reference has |
9470 |
occurred, if available. |
occurred, if available. |
9471 |
|
|
9472 |
|
WFErrDef: |
9473 |
|
@QName: xp|wf-entity-declared |
9474 |
|
@c:severity: c|SEVERITY_ERROR |
9475 |
|
@enDesc: |
9476 |
|
{P:: In a document |
9477 |
|
|
9478 |
|
- without any DTD, |
9479 |
|
|
9480 |
|
- with only an internal DTD subset that contains no parameter |
9481 |
|
entity references, or |
9482 |
|
|
9483 |
|
- with <XML::standalone="yes">, |
9484 |
|
|
9485 |
|
for an entity reference that does not occur within the external |
9486 |
|
subset or a parameter entity, the <CODE::Name> given in the |
9487 |
|
entity reference <kwd:MUST> match the <CODE::Name> does not |
9488 |
|
occur within the external subset or a parameter entity, |
9489 |
|
except that five predefined character entities need not |
9490 |
|
be declared. The declaration of a general entity <kwd:MUST> |
9491 |
|
precede any reference to it which appears in a default value |
9492 |
|
in an attribute list declaration. |
9493 |
|
@enMufDef: |
9494 |
|
Entity |%p (name => {<Q::xp|name>});| must be declared |
9495 |
|
in the internal subset |
9496 |
|
@ecore:hasParameter: xp|error-token |
9497 |
|
@ecore:hasParameter: |
9498 |
|
@@@: xp|name |
9499 |
|
@@enDesc: |
9500 |
|
The name of the entity. |
9501 |
|
|
9502 |
FatalErrDef: |
FatalErrDef: |
9503 |
@QName: xp|fatal-xml11-end-of-line-in-xml-declaration |
@QName: xp|fatal-xml11-end-of-line-in-xml-declaration |
9504 |
@DOMCore:severity: DOMCore|SEVERITY_ERROR |
@DOMCore:severity: DOMCore|SEVERITY_ERROR |