849 |
|
|
850 |
@Method: |
@Method: |
851 |
@@Name: createXDPRNIKeyword |
@@Name: createXDPRNIKeyword |
852 |
|
@@dlp:methodName: create_xdp_rni_keyword |
853 |
@@enDesc: |
@@enDesc: |
854 |
Creates a <XE::xdp|rni-keyword> element. |
Creates a <XE::xdp|rni-keyword> element. |
855 |
@@Param: |
@@Param: |
3221 |
|
|
3222 |
$test->id ('dtdText'); |
$test->id ('dtdText'); |
3223 |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
3224 |
|
|
3225 |
|
@Method: |
3226 |
|
@@Name: createXDPAttrDefinition |
3227 |
|
@@enDesc: |
3228 |
|
Creates a <XE::xdp|attr-definition> element. |
3229 |
|
|
3230 |
|
{ISSUE:: |
3231 |
|
Declared type and default type parameters should be added? |
3232 |
|
} |
3233 |
|
@@Param: |
3234 |
|
@@@Name: name |
3235 |
|
@@@Type: DOMString |
3236 |
|
@@@enDesc: |
3237 |
|
The name of the attribute. |
3238 |
|
@@@nullCase: |
3239 |
|
@@@@enDesc: |
3240 |
|
All parameters are ignored. |
3241 |
|
@@Return: |
3242 |
|
@@@Type: XDPElement |
3243 |
|
@@@enDesc: |
3244 |
|
The newly created element node. |
3245 |
|
|
3246 |
|
{P:: A new <IF::Element> node with following attributes |
3247 |
|
<kwd:MUST> be returned: |
3248 |
|
|
3249 |
|
- <A::Node.localName>::: <XE::attr-definition>. |
3250 |
|
|
3251 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3252 |
|
|
3253 |
|
- <A::Node.ownerDocument>::: The document. |
3254 |
|
|
3255 |
|
} |
3256 |
|
|
3257 |
|
{P:: If <P::name> is different from <DOM::null>, a |
3258 |
|
<IF::Element> node with following attributes |
3259 |
|
<kwd:MUST> be appended to the returned node |
3260 |
|
as if the <M::Node.appendChild> method were invoked. |
3261 |
|
|
3262 |
|
- <A::Node.localName>::: <XE::name>. |
3263 |
|
|
3264 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3265 |
|
|
3266 |
|
- <A::Node.ownerDocument>::: The document. |
3267 |
|
|
3268 |
|
- <A::Node.textContent>::: <P::name>. |
3269 |
|
|
3270 |
|
} |
3271 |
|
@@@PerlDef: |
3272 |
|
__DEEP{ |
3273 |
|
$r = $self-><M::Document.createElementNS> |
3274 |
|
(<Q::xdp|>, 'attr-definition'); |
3275 |
|
$r-><M::Node.appendChild> |
3276 |
|
($self-><M::XDPDocument.createXDPName> ($name)) |
3277 |
|
if defined $name; |
3278 |
|
}__; |
3279 |
|
|
3280 |
|
@@Test: |
3281 |
|
@@@QName: XDPDocument.createXDPAttrDefinition.1.test |
3282 |
|
@@@PerlDef: |
3283 |
|
my $doc; |
3284 |
|
__CODE{createXDPDocumentForTest}__; |
3285 |
|
|
3286 |
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition> ('aname'); |
3287 |
|
|
3288 |
|
$test->id ('interface'); |
3289 |
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3290 |
|
|
3291 |
|
$test->id ('namespaceURI'); |
3292 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3293 |
|
|
3294 |
|
$test->id ('localName'); |
3295 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3296 |
|
|
3297 |
|
$test->id ('dtdText'); |
3298 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, 'aname'); |
3299 |
|
@@Test: |
3300 |
|
@@@QName: XDPDocument.createXDPAttrDefinition.2.test |
3301 |
|
@@@PerlDef: |
3302 |
|
my $doc; |
3303 |
|
__CODE{createXDPDocumentForTest}__; |
3304 |
|
|
3305 |
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition>; |
3306 |
|
|
3307 |
|
$test->id ('interface'); |
3308 |
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3309 |
|
|
3310 |
|
$test->id ('namespaceURI'); |
3311 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3312 |
|
|
3313 |
|
$test->id ('localName'); |
3314 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3315 |
|
|
3316 |
|
$test->id ('dtdText'); |
3317 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
3318 |
|
|
3319 |
|
@Method: |
3320 |
|
@@Name: createXDPAttlist |
3321 |
|
@@enDesc: |
3322 |
|
Creates a <XE::xdp|attlist> element. |
3323 |
|
@@Param: |
3324 |
|
@@@Name: name |
3325 |
|
@@@Type: DOMString |
3326 |
|
@@@enDesc: |
3327 |
|
The name in the declaration. |
3328 |
|
@@@nullCase: |
3329 |
|
@@@@enDesc: |
3330 |
|
The declaration does not contain any name. |
3331 |
|
@@Return: |
3332 |
|
@@@Type: XDPAttlistElement |
3333 |
|
@@@enDesc: |
3334 |
|
The newly created element node. |
3335 |
|
|
3336 |
|
{P:: A new <IF::Element> node with following attributes |
3337 |
|
<kwd:MUST> be returned: |
3338 |
|
|
3339 |
|
- <A::Node.localName>::: <XE::attlist>. |
3340 |
|
|
3341 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3342 |
|
|
3343 |
|
- <A::Node.ownerDocument>::: The document. |
3344 |
|
|
3345 |
|
} |
3346 |
|
|
3347 |
|
{P:: If <P::name> is different from <DOM::null>, two |
3348 |
|
<IF::Element> nodes with following attributes |
3349 |
|
<kwd:MUST> be appended to the returned node |
3350 |
|
as if the <M::Node.appendChild> method were invoked in order. |
3351 |
|
|
3352 |
|
{LI:: |
3353 |
|
|
3354 |
|
- <A::Node.localName>::: <XE::s>. |
3355 |
|
|
3356 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3357 |
|
|
3358 |
|
- <A::Node.ownerDocument>::: The document. |
3359 |
|
|
3360 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3361 |
|
|
3362 |
|
} |
3363 |
|
|
3364 |
|
{LI:: |
3365 |
|
|
3366 |
|
- <A::Node.localName>::: <XE::name>. |
3367 |
|
|
3368 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3369 |
|
|
3370 |
|
- <A::Node.ownerDocument>::: The document. |
3371 |
|
|
3372 |
|
- <A::Node.textContent>::: <P::name>. |
3373 |
|
|
3374 |
|
} |
3375 |
|
|
3376 |
|
} |
3377 |
|
@@@PerlDef: |
3378 |
|
__DEEP{ |
3379 |
|
$r = $self-><M::Document.createElementNS> |
3380 |
|
(<Q::xdp|>, 'attlist'); |
3381 |
|
if (defined $name) { |
3382 |
|
$r-><M::Node.appendChild> |
3383 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3384 |
|
$r-><M::Node.appendChild> |
3385 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3386 |
|
} |
3387 |
|
}__; |
3388 |
|
|
3389 |
|
@@Test: |
3390 |
|
@@@QName: XDPDocument.createXDPAttlist.1.test |
3391 |
|
@@@PerlDef: |
3392 |
|
my $doc; |
3393 |
|
__CODE{createXDPDocumentForTest}__; |
3394 |
|
|
3395 |
|
my $el = $doc-><M::XDPDocument.createXDPAttlist> ('aname'); |
3396 |
|
|
3397 |
|
$test->id ('interface'); |
3398 |
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3399 |
|
|
3400 |
|
$test->id ('namespaceURI'); |
3401 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3402 |
|
|
3403 |
|
$test->id ('localName'); |
3404 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3405 |
|
|
3406 |
|
$test->id ('dtdText'); |
3407 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST aname>'); |
3408 |
|
@@Test: |
3409 |
|
@@@QName: XDPDocument.createXDPAttlist.2.test |
3410 |
|
@@@PerlDef: |
3411 |
|
my $doc; |
3412 |
|
__CODE{createXDPDocumentForTest}__; |
3413 |
|
|
3414 |
|
my $el = $doc-><M::XDPDocument.createXDPAttlist>; |
3415 |
|
|
3416 |
|
$test->id ('interface'); |
3417 |
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3418 |
|
|
3419 |
|
$test->id ('namespaceURI'); |
3420 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3421 |
|
|
3422 |
|
$test->id ('localName'); |
3423 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3424 |
|
|
3425 |
|
$test->id ('dtdText'); |
3426 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST>'); |
3427 |
|
|
3428 |
|
@Method: |
3429 |
|
@@Name: createXDPElement |
3430 |
|
@@enDesc: |
3431 |
|
Creates a <XE::xdp|element> element. |
3432 |
|
|
3433 |
|
{ISSUE:: |
3434 |
|
Should declared content parameter be added? |
3435 |
|
} |
3436 |
|
@@Param: |
3437 |
|
@@@Name: name |
3438 |
|
@@@Type: DOMString |
3439 |
|
@@@enDesc: |
3440 |
|
The name in the declaration. |
3441 |
|
@@@nullCase: |
3442 |
|
@@@@enDesc: |
3443 |
|
The declaration does not contain any name. |
3444 |
|
@@Return: |
3445 |
|
@@@Type: XDPElementElement |
3446 |
|
@@@enDesc: |
3447 |
|
The newly created element node. |
3448 |
|
|
3449 |
|
{P:: A new <IF::Element> node with following attributes |
3450 |
|
<kwd:MUST> be returned: |
3451 |
|
|
3452 |
|
- <A::Node.localName>::: <XE::element>. |
3453 |
|
|
3454 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3455 |
|
|
3456 |
|
- <A::Node.ownerDocument>::: The document. |
3457 |
|
|
3458 |
|
} |
3459 |
|
|
3460 |
|
{P:: If <P::name> is different from <DOM::null>, two |
3461 |
|
<IF::Element> nodes with following attributes |
3462 |
|
<kwd:MUST> be appended to the returned node |
3463 |
|
as if the <M::Node.appendChild> method were invoked in order. |
3464 |
|
|
3465 |
|
{LI:: |
3466 |
|
|
3467 |
|
- <A::Node.localName>::: <XE::s>. |
3468 |
|
|
3469 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3470 |
|
|
3471 |
|
- <A::Node.ownerDocument>::: The document. |
3472 |
|
|
3473 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3474 |
|
|
3475 |
|
} |
3476 |
|
|
3477 |
|
{LI:: |
3478 |
|
|
3479 |
|
- <A::Node.localName>::: <XE::name>. |
3480 |
|
|
3481 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3482 |
|
|
3483 |
|
- <A::Node.ownerDocument>::: The document. |
3484 |
|
|
3485 |
|
- <A::Node.textContent>::: <P::name>. |
3486 |
|
|
3487 |
|
} |
3488 |
|
|
3489 |
|
} |
3490 |
|
@@@PerlDef: |
3491 |
|
__DEEP{ |
3492 |
|
$r = $self-><M::Document.createElementNS> |
3493 |
|
(<Q::xdp|>, 'element'); |
3494 |
|
if (defined $name) { |
3495 |
|
$r-><M::Node.appendChild> |
3496 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3497 |
|
$r-><M::Node.appendChild> |
3498 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3499 |
|
} |
3500 |
|
}__; |
3501 |
|
|
3502 |
|
@@Test: |
3503 |
|
@@@QName: XDPDocument.createXDPElement.1.test |
3504 |
|
@@@PerlDef: |
3505 |
|
my $doc; |
3506 |
|
__CODE{createXDPDocumentForTest}__; |
3507 |
|
|
3508 |
|
my $el = $doc-><M::XDPDocument.createXDPElement> ('aname'); |
3509 |
|
|
3510 |
|
$test->id ('interface'); |
3511 |
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3512 |
|
|
3513 |
|
$test->id ('namespaceURI'); |
3514 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3515 |
|
|
3516 |
|
$test->id ('localName'); |
3517 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3518 |
|
|
3519 |
|
$test->id ('dtdText'); |
3520 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT aname>'); |
3521 |
|
@@Test: |
3522 |
|
@@@QName: XDPDocument.createXDPElement.2.test |
3523 |
|
@@@PerlDef: |
3524 |
|
my $doc; |
3525 |
|
__CODE{createXDPDocumentForTest}__; |
3526 |
|
|
3527 |
|
my $el = $doc-><M::XDPDocument.createXDPElement>; |
3528 |
|
|
3529 |
|
$test->id ('interface'); |
3530 |
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3531 |
|
|
3532 |
|
$test->id ('namespaceURI'); |
3533 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3534 |
|
|
3535 |
|
$test->id ('localName'); |
3536 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3537 |
|
|
3538 |
|
$test->id ('dtdText'); |
3539 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT>'); |
3540 |
|
|
3541 |
|
@Method: |
3542 |
|
@@Name: createXDPIf |
3543 |
|
@@enDesc: |
3544 |
|
Creates an <XE::xdp|if> element. |
3545 |
|
@@Param: |
3546 |
|
@@@Name: statusEntity |
3547 |
|
@@@Type: DOMString |
3548 |
|
@@@enDesc: |
3549 |
|
The name of the parameter entity that contains |
3550 |
|
the status of the marked section. |
3551 |
|
@@@nullCase: |
3552 |
|
@@@@enDesc: |
3553 |
|
Same as an empty string. |
3554 |
|
@@Return: |
3555 |
|
@@@Type: XDPIfElement |
3556 |
|
@@@enDesc: |
3557 |
|
The newly created element node. |
3558 |
|
|
3559 |
|
{P:: A new <IF::Element> node with following attributes |
3560 |
|
<kwd:MUST> be returned: |
3561 |
|
|
3562 |
|
- <A::Node.localName>::: <XE::if>. |
3563 |
|
|
3564 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3565 |
|
|
3566 |
|
- <A::Node.ownerDocument>::: The document. |
3567 |
|
|
3568 |
|
} |
3569 |
|
|
3570 |
|
{P:: The <A::Node.attributes> <IF::tc|NamedNodeMap> |
3571 |
|
of the returned <IF:Element> node <kwd:MUST> contain |
3572 |
|
a new <IF::te|Attr> node with following attributes: |
3573 |
|
|
3574 |
|
- <A::Node.localName>::: <XA::status-entity>. |
3575 |
|
|
3576 |
|
- <A::Node.namespaceURI>::: <DOM::null>. |
3577 |
|
|
3578 |
|
- <A::te|Attr.specified>::: <DOM::true>. |
3579 |
|
|
3580 |
|
- <A::Node.textContent>::: <P::statusEntity>, or an empty |
3581 |
|
string if <P::statusEntity> |
3582 |
|
is <DOM::null>. |
3583 |
|
|
3584 |
|
} |
3585 |
|
|
3586 |
|
{P:: <A::Node.childNodes> <IF::tc|NodeList> of |
3587 |
|
the returned <IF::Element> node <kwd:MUST> contain |
3588 |
|
two <IF::Element> nodes in order: |
3589 |
|
|
3590 |
|
{LI:: |
3591 |
|
|
3592 |
|
- <A::Node.localName>::: <XE::true>. |
3593 |
|
|
3594 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3595 |
|
|
3596 |
|
- <A::Node.ownerDocument>::: The document. |
3597 |
|
|
3598 |
|
- <A::Node.textContent>::: An empty string. |
3599 |
|
|
3600 |
|
} |
3601 |
|
|
3602 |
|
{LI:: |
3603 |
|
|
3604 |
|
- <A::Node.localName>::: <XE::false>. |
3605 |
|
|
3606 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3607 |
|
|
3608 |
|
- <A::Node.ownerDocument>::: The document. |
3609 |
|
|
3610 |
|
- <A::Node.textContent>::: An empty string. |
3611 |
|
|
3612 |
|
} |
3613 |
|
|
3614 |
|
} |
3615 |
|
@@@PerlDef: |
3616 |
|
__DEEP{ |
3617 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'if'); |
3618 |
|
$r-><M::Element.setAttributeNS> |
3619 |
|
(null, 'status-entity', |
3620 |
|
defined $statusEntity ? $statusEntity : ''); |
3621 |
|
$r-><M::Node.appendChild> |
3622 |
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'tr'.'ue')); |
3623 |
|
$r-><M::Node.appendChild> |
3624 |
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'fal'.'se')); |
3625 |
|
}__; |
3626 |
|
|
3627 |
|
@@Test: |
3628 |
|
@@@QName: XDPDocument.createXDPIf.1.test |
3629 |
|
@@@PerlDef: |
3630 |
|
my $doc; |
3631 |
|
__CODE{createXDPDocumentForTest}__; |
3632 |
|
|
3633 |
|
my $el = $doc-><M::XDPDocument.createXDPIf> ('aname'); |
3634 |
|
|
3635 |
|
$test->id ('interface'); |
3636 |
|
$test->assert_isa ($el, <IFName::XDPIfElement>); |
3637 |
|
|
3638 |
|
$test->id ('namespaceURI'); |
3639 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3640 |
|
|
3641 |
|
$test->id ('localName'); |
3642 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'if'); |
3643 |
|
|
3644 |
|
$test->id ('dtdText'); |
3645 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
3646 |
|
"<![%aname;[\n<!-- end of aname -->]]>"); |
3647 |
|
|
3648 |
|
$test->id ('fc'); |
3649 |
|
my $fc = $el-><AG::Node.firstChild>; |
3650 |
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3651 |
|
|
3652 |
|
$test->id ('fc.namespaceURI'); |
3653 |
|
$test->assert_equals ($fc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3654 |
|
|
3655 |
|
$test->id ('fc.localName'); |
3656 |
|
$test->assert_equals ($fc-><AG::Node.localName>, 'tr'.'ue'); |
3657 |
|
|
3658 |
|
$test->id ('lc'); |
3659 |
|
my $lc = $el-><AG::Node.lastChild>; |
3660 |
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3661 |
|
|
3662 |
|
$test->id ('lc.namespaceURI'); |
3663 |
|
$test->assert_equals ($lc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3664 |
|
|
3665 |
|
$test->id ('lc.localName'); |
3666 |
|
$test->assert_equals ($lc-><AG::Node.localName>, 'fal'.'se'); |
3667 |
##XDPDocument |
##XDPDocument |
3668 |
|
|
3669 |
IFClsDef: |
IFClsDef: |
4134 |
C: while (defined $current) { |
C: while (defined $current) { |
4135 |
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4136 |
if ({ |
if ({ |
4137 |
|
<Q::xdp|attr-definition> => true, |
4138 |
<Q::xdp|peref> => true, |
<Q::xdp|peref> => true, |
4139 |
}->{$current->manakai_expanded_uri}) { |
}->{$current->manakai_expanded_uri}) { |
4140 |
$r .= $current-><AG::XDPElement.dtdText>; |
$r .= $current-><AG::XDPElement.dtdText>; |
4234 |
$r =~ s/"/"/g; |
$r =~ s/"/"/g; |
4235 |
$r = '"'.$r.'"'; |
$r = '"'.$r.'"'; |
4236 |
} |
} |
4237 |
##XDPPAttrLiteralElement |
##XDPAttrLiteralElement |
4238 |
|
|
4239 |
IFClsETDef: |
IFClsETDef: |
4240 |
@IFQName: XDPMinimumLiteralElement |
@IFQName: XDPMinimumLiteralElement |
4279 |
$r =~ s/"/%22/g; |
$r =~ s/"/%22/g; |
4280 |
$r = '"'.$r.'"'; |
$r = '"'.$r.'"'; |
4281 |
##XDPSystemLiteralElement |
##XDPSystemLiteralElement |
4282 |
|
|
4283 |
|
IFClsETDef: |
4284 |
|
@IFQName: XDPIfElement |
4285 |
|
@ETQName: xdp|if |
4286 |
|
@ClsQName: ManakaiDOMXDPIfElement |
4287 |
|
|
4288 |
|
@IFISA: XDPElement |
4289 |
|
@ClsISA: ManakaiDOMXDPElement |
4290 |
|
|
4291 |
|
@enDesc: |
4292 |
|
An <XE::xdp|if> element represents a set of XML DTD declarations |
4293 |
|
with a conditional section that can be enabled by a |
4294 |
|
parameter entity. |
4295 |
|
|
4296 |
|
@CAttr: |
4297 |
|
@@Name: dtdText |
4298 |
|
@@Type: DOMString |
4299 |
|
@@Get: |
4300 |
|
@@@PerlDef: |
4301 |
|
__DEEP{ |
4302 |
|
require Message::DOM::Traversal; |
4303 |
|
my $doctrv = $self-><AG::Node.ownerDocument> |
4304 |
|
-><M::Node.getFeature> (Traversal => '2.0'); |
4305 |
|
my $tw = $doctrv->create_tree_walker |
4306 |
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
4307 |
|
<C::NodeFilter.SHOW_TEXT> | |
4308 |
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
4309 |
|
sub { |
4310 |
|
my $node = $_[1]; |
4311 |
|
if ($node-><AG::Node.nodeType> |
4312 |
|
== <C::Node.ELEMENT_NODE>) { |
4313 |
|
my $ns = $node-><AG::Node.namespaceURI>; |
4314 |
|
if (not defined $ns) { |
4315 |
|
return <C::NodeFilter.FILTER_REJECT>; |
4316 |
|
} elsif ($ns eq <Q::xdp|>) { |
4317 |
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4318 |
|
} else { |
4319 |
|
return <C::NodeFilter.FILTER_REJECT>; |
4320 |
|
} |
4321 |
|
} else { |
4322 |
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4323 |
|
} |
4324 |
|
}, true); |
4325 |
|
my $current = $tw->first_child; |
4326 |
|
|
4327 |
|
my $pename = $self-><M::Element.getAttributeNS> |
4328 |
|
(null, 'status-entity'); |
4329 |
|
$r = '<![%'.$pename.";[\n"; |
4330 |
|
|
4331 |
|
my $has_true; |
4332 |
|
C: while (defined $current) { |
4333 |
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4334 |
|
if (not $has_true and |
4335 |
|
$current->manakai_expanded_uri eq <Q::xdp|true>) { |
4336 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4337 |
|
$r .= "<!-- end of $pename -->]]>"; |
4338 |
|
$has_true = true; |
4339 |
|
} elsif ($current->manakai_expanded_uri eq <Q::xdp|false>) { |
4340 |
|
my $v = $current-><AG::XDPElement.dtdText>; |
4341 |
|
$r .= "\n" if length $v; |
4342 |
|
$r .= $v; |
4343 |
|
} else { |
4344 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4345 |
|
} |
4346 |
|
} else { |
4347 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4348 |
|
} |
4349 |
|
|
4350 |
|
$current = $tw->next_sibling; |
4351 |
|
} # C |
4352 |
|
|
4353 |
|
$r .= "<!-- end of $pename -->]]>" unless $has_true; |
4354 |
|
}__; |
4355 |
|
##XDPIfElement |