20 |
@@@QName: Markup|common |
@@@QName: Markup|common |
21 |
@@Module: |
@@Module: |
22 |
@@@QName: MDOM|TreeCore |
@@@QName: MDOM|TreeCore |
|
@@@WithFor: ManakaiDOM|ManakaiDOMLatest |
|
|
@@Module: |
|
|
@@@WithFor: ManakaiDOM|ManakaiDOM |
|
|
@@Module: |
|
|
@@@WithFor: ManakaiDOM|ManakaiDOMLatest |
|
|
@DefaultFor: ManakaiDOM|ManakaiDOMLatest |
|
23 |
|
|
24 |
Namespace: |
Namespace: |
25 |
@atom: |
@atom: |
36 |
http://suika.fam.cx/~wakaba/archive/2004/dom/xdt# |
http://suika.fam.cx/~wakaba/archive/2004/dom/xdt# |
37 |
@DOMMain: |
@DOMMain: |
38 |
http://suika.fam.cx/~wakaba/archive/2004/dom/main# |
http://suika.fam.cx/~wakaba/archive/2004/dom/main# |
39 |
|
@domperl: |
40 |
|
http://suika.fam.cx/~wakaba/archive/2006/dom/perl/ |
41 |
@dx: |
@dx: |
42 |
http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException# |
http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException# |
43 |
@ecore: |
@ecore: |
105 |
dis:ResourceDef |
dis:ResourceDef |
106 |
@ShadowContent: |
@ShadowContent: |
107 |
@@DISCore:resourceType: DISLang|Method |
@@DISCore:resourceType: DISLang|Method |
|
@@ForCheck: !=ManakaiDOM|ManakaiDOM |
|
108 |
|
|
109 |
ElementTypeBinding: |
ElementTypeBinding: |
110 |
@Name: Param |
@Name: Param |
126 |
dis:ResourceDef |
dis:ResourceDef |
127 |
@ShadowContent: |
@ShadowContent: |
128 |
@@DISCore:resourceType: DISLang|Attribute |
@@DISCore:resourceType: DISLang|Attribute |
|
@@ForCheck: !=ManakaiDOM|ManakaiDOM |
|
129 |
|
|
130 |
ElementTypeBinding: |
ElementTypeBinding: |
131 |
@Name: CAttr |
@Name: CAttr |
133 |
dis:ResourceDef |
dis:ResourceDef |
134 |
@ShadowContent: |
@ShadowContent: |
135 |
@@DISCore:resourceType: DISLang|Attribute |
@@DISCore:resourceType: DISLang|Attribute |
136 |
@@ForCheck: !=ManakaiDOM|ManakaiDOM ManakaiDOM|ForClass |
@@ForCheck:ManakaiDOM|ForClass |
137 |
|
|
138 |
ElementTypeBinding: |
ElementTypeBinding: |
139 |
@Name: Get |
@Name: Get |
198 |
@@resourceFor: ManakaiDOM|ForIF |
@@resourceFor: ManakaiDOM|ForIF |
199 |
@@resourceFor: ManakaiDOM|ForClass |
@@resourceFor: ManakaiDOM|ForClass |
200 |
@@resourceFor: s|ForML |
@@resourceFor: s|ForML |
|
@@For: ManakaiDOM|ManakaiDOM |
|
201 |
|
|
202 |
@@DISCore:resourceType: |
@@DISCore:resourceType: |
203 |
@@@@: DISLang|Interface |
@@@@: DISLang|Interface |
206 |
@@DISCore:resourceType: |
@@DISCore:resourceType: |
207 |
@@@@: DISLang|Class |
@@@@: DISLang|Class |
208 |
@@@ForCheck: ManakaiDOM|ForClass |
@@@ForCheck: ManakaiDOM|ForClass |
209 |
|
|
210 |
@@Implement: |
@@Implement: |
211 |
@@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF |
@@@@: ||+||ManakaiDOM|ForIF |
|
@@@ContentType: DISCore|TFPQNames |
|
|
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM |
|
|
@@Implement: |
|
|
@@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF |
|
212 |
@@@ContentType: DISCore|TFPQNames |
@@@ContentType: DISCore|TFPQNames |
213 |
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest |
@@@ForCheck: ManakaiDOM|ForClass |
214 |
|
|
215 |
@@s:elementType: |
@@s:elementType: |
216 |
@@@@: ||+||s|ForML |
@@@@: ||+||s|ForML |
233 |
@@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML |
@@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML |
234 |
@@resourceFor: ManakaiDOM|ForIF |
@@resourceFor: ManakaiDOM|ForIF |
235 |
@@resourceFor: ManakaiDOM|ForClass |
@@resourceFor: ManakaiDOM|ForClass |
|
@@For: ManakaiDOM|ManakaiDOM |
|
236 |
|
|
237 |
@@DISCore:resourceType: |
@@DISCore:resourceType: |
238 |
@@@@: DISLang|Interface |
@@@@: DISLang|Interface |
241 |
@@DISCore:resourceType: |
@@DISCore:resourceType: |
242 |
@@@@: DISLang|Class |
@@@@: DISLang|Class |
243 |
@@@ForCheck: ManakaiDOM|ForClass |
@@@ForCheck: ManakaiDOM|ForClass |
244 |
|
|
245 |
@@Implement: |
@@Implement: |
246 |
@@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF |
@@@@: ||+||ManakaiDOM|ForIF |
|
@@@ContentType: DISCore|TFPQNames |
|
|
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM |
|
|
@@Implement: |
|
|
@@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF |
|
247 |
@@@ContentType: DISCore|TFPQNames |
@@@ContentType: DISCore|TFPQNames |
248 |
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest |
@@@ForCheck: ManakaiDOM|ForClass |
249 |
|
|
250 |
@@f:implements: XDPFeature30 |
@@f:implements: XDPFeature30 |
251 |
|
|
327 |
ResourceDef: |
ResourceDef: |
328 |
@QName: Document |
@QName: Document |
329 |
@AliasFor: td|Document |
@AliasFor: td|Document |
|
@For: ManakaiDOM|DOM |
|
330 |
|
|
331 |
ResourceDef: |
ResourceDef: |
332 |
@QName: Element |
@QName: Element |
333 |
@AliasFor: te|Element |
@AliasFor: te|Element |
|
@For: ManakaiDOM|DOM |
|
334 |
|
|
335 |
ResourceDef: |
ResourceDef: |
336 |
@QName: Attr |
@QName: Attr |
337 |
@AliasFor: te|Attr |
@AliasFor: te|Attr |
|
@For: ManakaiDOM|DOM |
|
338 |
|
|
339 |
ResourceDef: |
ResourceDef: |
340 |
@QName: Text |
@QName: Text |
341 |
@AliasFor: te|Text |
@AliasFor: te|Text |
|
@For: ManakaiDOM|DOM |
|
342 |
|
|
343 |
ResourceDef: |
ResourceDef: |
344 |
@QName: DOMString |
@QName: DOMString |
345 |
@AliasFor: DOMMain|DOMString |
@AliasFor: DOMMain|DOMString |
|
@For: ManakaiDOM|DOM |
|
346 |
|
|
347 |
ResourceDef: |
ResourceDef: |
348 |
@QName: boolean |
@QName: boolean |
349 |
@AliasFor: idl|boolean||ManakaiDOM|all |
@AliasFor: idl|boolean |
350 |
|
|
351 |
ResourceDef: |
ResourceDef: |
352 |
@QName: Node |
@QName: Node |
353 |
@AliasFor: tc|Node |
@AliasFor: tc|Node |
|
@For: ManakaiDOM|ManakaiDOM |
|
354 |
|
|
355 |
ResourceDef: |
ResourceDef: |
356 |
@QName: NodeFilter |
@QName: NodeFilter |
357 |
@AliasFor: trv|NodeFilter |
@AliasFor: trv|NodeFilter |
|
@For: ManakaiDOM|DOM2 |
|
358 |
|
|
359 |
ResourceDef: |
ResourceDef: |
360 |
@QName: TreeWalker |
@QName: TreeWalker |
361 |
@AliasFor: trv|TreeWalker |
@AliasFor: trv|TreeWalker |
|
@For: ManakaiDOM|DOM2 |
|
362 |
|
|
363 |
ElementTypeBinding: |
ElementTypeBinding: |
364 |
@Name: enDesc |
@Name: enDesc |
377 |
@@Value: |
@@Value: |
378 |
@@@@: 1 |
@@@@: 1 |
379 |
@@@ContentType: DISCore|Boolean |
@@@ContentType: DISCore|Boolean |
380 |
@@Type: idl|boolean||ManakaiDOM|all |
@@Type: idl|boolean |
381 |
|
|
382 |
ElementTypeBinding: |
ElementTypeBinding: |
383 |
@Name: FalseCase |
@Name: FalseCase |
389 |
@@Value: |
@@Value: |
390 |
@@@@: 0 |
@@@@: 0 |
391 |
@@@ContentType: DISCore|Boolean |
@@@ContentType: DISCore|Boolean |
392 |
@@Type: idl|boolean||ManakaiDOM|all |
@@Type: idl|boolean |
393 |
|
|
394 |
## -- Features |
## -- Features |
395 |
|
|
399 |
dis:ResourceDef |
dis:ResourceDef |
400 |
@ShadowContent: |
@ShadowContent: |
401 |
@@DISCore:resourceType: f|Feature |
@@DISCore:resourceType: f|Feature |
|
@@For: =ManakaiDOM|all |
|
402 |
|
|
403 |
ElementTypeBinding: |
ElementTypeBinding: |
404 |
@Name: FeatureVerDef |
@Name: FeatureVerDef |
431 |
@IFQName: XDPDocument |
@IFQName: XDPDocument |
432 |
@ClsQName: ManakaiDOMXDPDocument |
@ClsQName: ManakaiDOMXDPDocument |
433 |
|
|
434 |
@IFISA: Document |
@domperl:implementedByObjectsOf: Document |
435 |
@ClsISA: td|ManakaiDOMDocument |
@domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument |
436 |
|
|
437 |
@f:implements: XDPFeature30 |
@f:implements: XDPFeature30 |
438 |
@f:provides: |
@f:provides: |
457 |
<IFName::f|GetFeature>, |
<IFName::f|GetFeature>, |
458 |
) { |
) { |
459 |
$test->id ($_); |
$test->id ($_); |
460 |
$test->assert_true (<Class::ManakaiDOMXDPDocument>->isa ($_)); |
$test->assert_true (<Class::td|ManakaiDOMDocument>->isa ($_)); |
461 |
} |
} |
462 |
|
|
463 |
@Test: |
@Test: |
826 |
|
|
827 |
@Method: |
@Method: |
828 |
@@Name: createXDPRNIKeyword |
@@Name: createXDPRNIKeyword |
829 |
|
@@dlp:methodName: create_xdp_rni_keyword |
830 |
@@enDesc: |
@@enDesc: |
831 |
Creates a <XE::xdp|rni-keyword> element. |
Creates a <XE::xdp|rni-keyword> element. |
832 |
@@Param: |
@@Param: |
3514 |
|
|
3515 |
$test->id ('dtdText'); |
$test->id ('dtdText'); |
3516 |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT>'); |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT>'); |
3517 |
|
|
3518 |
|
@Method: |
3519 |
|
@@Name: createXDPIf |
3520 |
|
@@enDesc: |
3521 |
|
Creates an <XE::xdp|if> element. |
3522 |
|
@@Param: |
3523 |
|
@@@Name: statusEntity |
3524 |
|
@@@Type: DOMString |
3525 |
|
@@@enDesc: |
3526 |
|
The name of the parameter entity that contains |
3527 |
|
the status of the marked section. |
3528 |
|
@@@nullCase: |
3529 |
|
@@@@enDesc: |
3530 |
|
Same as an empty string. |
3531 |
|
@@Return: |
3532 |
|
@@@Type: XDPIfElement |
3533 |
|
@@@enDesc: |
3534 |
|
The newly created element node. |
3535 |
|
|
3536 |
|
{P:: A new <IF::Element> node with following attributes |
3537 |
|
<kwd:MUST> be returned: |
3538 |
|
|
3539 |
|
- <A::Node.localName>::: <XE::if>. |
3540 |
|
|
3541 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3542 |
|
|
3543 |
|
- <A::Node.ownerDocument>::: The document. |
3544 |
|
|
3545 |
|
} |
3546 |
|
|
3547 |
|
{P:: The <A::Node.attributes> <IF::tc|NamedNodeMap> |
3548 |
|
of the returned <IF:Element> node <kwd:MUST> contain |
3549 |
|
a new <IF::te|Attr> node with following attributes: |
3550 |
|
|
3551 |
|
- <A::Node.localName>::: <XA::status-entity>. |
3552 |
|
|
3553 |
|
- <A::Node.namespaceURI>::: <DOM::null>. |
3554 |
|
|
3555 |
|
- <A::te|Attr.specified>::: <DOM::true>. |
3556 |
|
|
3557 |
|
- <A::Node.textContent>::: <P::statusEntity>, or an empty |
3558 |
|
string if <P::statusEntity> |
3559 |
|
is <DOM::null>. |
3560 |
|
|
3561 |
|
} |
3562 |
|
|
3563 |
|
{P:: <A::Node.childNodes> <IF::tc|NodeList> of |
3564 |
|
the returned <IF::Element> node <kwd:MUST> contain |
3565 |
|
two <IF::Element> nodes in order: |
3566 |
|
|
3567 |
|
{LI:: |
3568 |
|
|
3569 |
|
- <A::Node.localName>::: <XE::true>. |
3570 |
|
|
3571 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3572 |
|
|
3573 |
|
- <A::Node.ownerDocument>::: The document. |
3574 |
|
|
3575 |
|
- <A::Node.textContent>::: An empty string. |
3576 |
|
|
3577 |
|
} |
3578 |
|
|
3579 |
|
{LI:: |
3580 |
|
|
3581 |
|
- <A::Node.localName>::: <XE::false>. |
3582 |
|
|
3583 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3584 |
|
|
3585 |
|
- <A::Node.ownerDocument>::: The document. |
3586 |
|
|
3587 |
|
- <A::Node.textContent>::: An empty string. |
3588 |
|
|
3589 |
|
} |
3590 |
|
|
3591 |
|
} |
3592 |
|
@@@PerlDef: |
3593 |
|
__DEEP{ |
3594 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'if'); |
3595 |
|
$r-><M::Element.setAttributeNS> |
3596 |
|
(null, 'status-entity', |
3597 |
|
defined $statusEntity ? $statusEntity : ''); |
3598 |
|
$r-><M::Node.appendChild> |
3599 |
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'tr'.'ue')); |
3600 |
|
$r-><M::Node.appendChild> |
3601 |
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'fal'.'se')); |
3602 |
|
}__; |
3603 |
|
|
3604 |
|
@@Test: |
3605 |
|
@@@QName: XDPDocument.createXDPIf.1.test |
3606 |
|
@@@PerlDef: |
3607 |
|
my $doc; |
3608 |
|
__CODE{createXDPDocumentForTest}__; |
3609 |
|
|
3610 |
|
my $el = $doc-><M::XDPDocument.createXDPIf> ('aname'); |
3611 |
|
|
3612 |
|
$test->id ('interface'); |
3613 |
|
$test->assert_isa ($el, <IFName::XDPIfElement>); |
3614 |
|
|
3615 |
|
$test->id ('namespaceURI'); |
3616 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3617 |
|
|
3618 |
|
$test->id ('localName'); |
3619 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'if'); |
3620 |
|
|
3621 |
|
$test->id ('dtdText'); |
3622 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
3623 |
|
"<![%aname;[\n<!-- end of aname -->]]>"); |
3624 |
|
|
3625 |
|
$test->id ('fc'); |
3626 |
|
my $fc = $el-><AG::Node.firstChild>; |
3627 |
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3628 |
|
|
3629 |
|
$test->id ('fc.namespaceURI'); |
3630 |
|
$test->assert_equals ($fc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3631 |
|
|
3632 |
|
$test->id ('fc.localName'); |
3633 |
|
$test->assert_equals ($fc-><AG::Node.localName>, 'tr'.'ue'); |
3634 |
|
|
3635 |
|
$test->id ('lc'); |
3636 |
|
my $lc = $el-><AG::Node.lastChild>; |
3637 |
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3638 |
|
|
3639 |
|
$test->id ('lc.namespaceURI'); |
3640 |
|
$test->assert_equals ($lc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3641 |
|
|
3642 |
|
$test->id ('lc.localName'); |
3643 |
|
$test->assert_equals ($lc-><AG::Node.localName>, 'fal'.'se'); |
3644 |
##XDPDocument |
##XDPDocument |
3645 |
|
|
3646 |
IFClsDef: |
IFClsDef: |
3650 |
@IFISA: Element |
@IFISA: Element |
3651 |
@ClsISA: te|ManakaiDOMElement |
@ClsISA: te|ManakaiDOMElement |
3652 |
|
|
3653 |
@s:elementType: AnyXDPElement||ManakaiDOM|all |
@s:elementType: AnyXDPElement |
3654 |
|
|
3655 |
@Test: |
@Test: |
3656 |
@@QName: createElementNS.XDPElement.test |
@@QName: createElementNS.XDPElement.test |
4111 |
C: while (defined $current) { |
C: while (defined $current) { |
4112 |
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4113 |
if ({ |
if ({ |
4114 |
|
<Q::xdp|attr-definition> => true, |
4115 |
<Q::xdp|peref> => true, |
<Q::xdp|peref> => true, |
4116 |
}->{$current->manakai_expanded_uri}) { |
}->{$current->manakai_expanded_uri}) { |
4117 |
$r .= $current-><AG::XDPElement.dtdText>; |
$r .= $current-><AG::XDPElement.dtdText>; |
4211 |
$r =~ s/"/"/g; |
$r =~ s/"/"/g; |
4212 |
$r = '"'.$r.'"'; |
$r = '"'.$r.'"'; |
4213 |
} |
} |
4214 |
##XDPPAttrLiteralElement |
##XDPAttrLiteralElement |
4215 |
|
|
4216 |
IFClsETDef: |
IFClsETDef: |
4217 |
@IFQName: XDPMinimumLiteralElement |
@IFQName: XDPMinimumLiteralElement |
4256 |
$r =~ s/"/%22/g; |
$r =~ s/"/%22/g; |
4257 |
$r = '"'.$r.'"'; |
$r = '"'.$r.'"'; |
4258 |
##XDPSystemLiteralElement |
##XDPSystemLiteralElement |
4259 |
|
|
4260 |
|
IFClsETDef: |
4261 |
|
@IFQName: XDPIfElement |
4262 |
|
@ETQName: xdp|if |
4263 |
|
@ClsQName: ManakaiDOMXDPIfElement |
4264 |
|
|
4265 |
|
@IFISA: XDPElement |
4266 |
|
@ClsISA: ManakaiDOMXDPElement |
4267 |
|
|
4268 |
|
@enDesc: |
4269 |
|
An <XE::xdp|if> element represents a set of XML DTD declarations |
4270 |
|
with a conditional section that can be enabled by a |
4271 |
|
parameter entity. |
4272 |
|
|
4273 |
|
@CAttr: |
4274 |
|
@@Name: dtdText |
4275 |
|
@@Type: DOMString |
4276 |
|
@@Get: |
4277 |
|
@@@PerlDef: |
4278 |
|
__DEEP{ |
4279 |
|
require Message::DOM::Traversal; |
4280 |
|
my $doctrv = $self-><AG::Node.ownerDocument> |
4281 |
|
-><M::Node.getFeature> (Traversal => '2.0'); |
4282 |
|
my $tw = $doctrv->create_tree_walker |
4283 |
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
4284 |
|
<C::NodeFilter.SHOW_TEXT> | |
4285 |
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
4286 |
|
sub { |
4287 |
|
my $node = $_[1]; |
4288 |
|
if ($node-><AG::Node.nodeType> |
4289 |
|
== <C::Node.ELEMENT_NODE>) { |
4290 |
|
my $ns = $node-><AG::Node.namespaceURI>; |
4291 |
|
if (not defined $ns) { |
4292 |
|
return <C::NodeFilter.FILTER_REJECT>; |
4293 |
|
} elsif ($ns eq <Q::xdp|>) { |
4294 |
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4295 |
|
} else { |
4296 |
|
return <C::NodeFilter.FILTER_REJECT>; |
4297 |
|
} |
4298 |
|
} else { |
4299 |
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4300 |
|
} |
4301 |
|
}, true); |
4302 |
|
my $current = $tw->first_child; |
4303 |
|
|
4304 |
|
my $pename = $self-><M::Element.getAttributeNS> |
4305 |
|
(null, 'status-entity'); |
4306 |
|
$r = '<![%'.$pename.";[\n"; |
4307 |
|
|
4308 |
|
my $has_true; |
4309 |
|
C: while (defined $current) { |
4310 |
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4311 |
|
if (not $has_true and |
4312 |
|
$current->manakai_expanded_uri eq <Q::xdp|true>) { |
4313 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4314 |
|
$r .= "<!-- end of $pename -->]]>"; |
4315 |
|
$has_true = true; |
4316 |
|
} elsif ($current->manakai_expanded_uri eq <Q::xdp|false>) { |
4317 |
|
my $v = $current-><AG::XDPElement.dtdText>; |
4318 |
|
$r .= "\n" if length $v; |
4319 |
|
$r .= $v; |
4320 |
|
} else { |
4321 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4322 |
|
} |
4323 |
|
} else { |
4324 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4325 |
|
} |
4326 |
|
|
4327 |
|
$current = $tw->next_sibling; |
4328 |
|
} # C |
4329 |
|
|
4330 |
|
$r .= "<!-- end of $pename -->]]>" unless $has_true; |
4331 |
|
}__; |
4332 |
|
##XDPIfElement |