3220 |
|
|
3221 |
$test->id ('dtdText'); |
$test->id ('dtdText'); |
3222 |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
3223 |
|
|
3224 |
|
@Method: |
3225 |
|
@@Name: createXDPAttrDefinition |
3226 |
|
@@enDesc: |
3227 |
|
Creates a <XE::xdp|attr-definition> element. |
3228 |
|
|
3229 |
|
{ISSUE:: |
3230 |
|
Declared type and default type parameters should be added? |
3231 |
|
} |
3232 |
|
@@Param: |
3233 |
|
@@@Name: name |
3234 |
|
@@@Type: DOMString |
3235 |
|
@@@enDesc: |
3236 |
|
The name of the attribute. |
3237 |
|
@@@nullCase: |
3238 |
|
@@@@enDesc: |
3239 |
|
All parameters are ignored. |
3240 |
|
@@Return: |
3241 |
|
@@@Type: XDPElement |
3242 |
|
@@@enDesc: |
3243 |
|
The newly created element node. |
3244 |
|
|
3245 |
|
{P:: A new <IF::Element> node with following attributes |
3246 |
|
<kwd:MUST> be returned: |
3247 |
|
|
3248 |
|
- <A::Node.localName>::: <XE::attr-definition>. |
3249 |
|
|
3250 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3251 |
|
|
3252 |
|
- <A::Node.ownerDocument>::: The document. |
3253 |
|
|
3254 |
|
} |
3255 |
|
|
3256 |
|
{P:: If <P::name> is different from <DOM::null>, a |
3257 |
|
<IF::Element> node with following attributes |
3258 |
|
<kwd:MUST> be appended to the returned node |
3259 |
|
as if the <M::Node.appendChild> method were invoked. |
3260 |
|
|
3261 |
|
- <A::Node.localName>::: <XE::name>. |
3262 |
|
|
3263 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3264 |
|
|
3265 |
|
- <A::Node.ownerDocument>::: The document. |
3266 |
|
|
3267 |
|
- <A::Node.textContent>::: <P::name>. |
3268 |
|
|
3269 |
|
} |
3270 |
|
@@@PerlDef: |
3271 |
|
__DEEP{ |
3272 |
|
$r = $self-><M::Document.createElementNS> |
3273 |
|
(<Q::xdp|>, 'attr-definition'); |
3274 |
|
$r-><M::Node.appendChild> |
3275 |
|
($self-><M::XDPDocument.createXDPName> ($name)) |
3276 |
|
if defined $name; |
3277 |
|
}__; |
3278 |
|
|
3279 |
|
@@Test: |
3280 |
|
@@@QName: XDPDocument.createXDPAttrDefinition.1.test |
3281 |
|
@@@PerlDef: |
3282 |
|
my $doc; |
3283 |
|
__CODE{createXDPDocumentForTest}__; |
3284 |
|
|
3285 |
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition> ('aname'); |
3286 |
|
|
3287 |
|
$test->id ('interface'); |
3288 |
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3289 |
|
|
3290 |
|
$test->id ('namespaceURI'); |
3291 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3292 |
|
|
3293 |
|
$test->id ('localName'); |
3294 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3295 |
|
|
3296 |
|
$test->id ('dtdText'); |
3297 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, 'aname'); |
3298 |
|
@@Test: |
3299 |
|
@@@QName: XDPDocument.createXDPAttrDefinition.2.test |
3300 |
|
@@@PerlDef: |
3301 |
|
my $doc; |
3302 |
|
__CODE{createXDPDocumentForTest}__; |
3303 |
|
|
3304 |
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition>; |
3305 |
|
|
3306 |
|
$test->id ('interface'); |
3307 |
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3308 |
|
|
3309 |
|
$test->id ('namespaceURI'); |
3310 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3311 |
|
|
3312 |
|
$test->id ('localName'); |
3313 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3314 |
|
|
3315 |
|
$test->id ('dtdText'); |
3316 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, ''); |
3317 |
|
|
3318 |
|
@Method: |
3319 |
|
@@Name: createXDPAttlist |
3320 |
|
@@enDesc: |
3321 |
|
Creates a <XE::xdp|attlist> element. |
3322 |
|
@@Param: |
3323 |
|
@@@Name: name |
3324 |
|
@@@Type: DOMString |
3325 |
|
@@@enDesc: |
3326 |
|
The name in the declaration. |
3327 |
|
@@@nullCase: |
3328 |
|
@@@@enDesc: |
3329 |
|
The declaration does not contain any name. |
3330 |
|
@@Return: |
3331 |
|
@@@Type: XDPAttlistElement |
3332 |
|
@@@enDesc: |
3333 |
|
The newly created element node. |
3334 |
|
|
3335 |
|
{P:: A new <IF::Element> node with following attributes |
3336 |
|
<kwd:MUST> be returned: |
3337 |
|
|
3338 |
|
- <A::Node.localName>::: <XE::attlist>. |
3339 |
|
|
3340 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3341 |
|
|
3342 |
|
- <A::Node.ownerDocument>::: The document. |
3343 |
|
|
3344 |
|
} |
3345 |
|
|
3346 |
|
{P:: If <P::name> is different from <DOM::null>, two |
3347 |
|
<IF::Element> nodes with following attributes |
3348 |
|
<kwd:MUST> be appended to the returned node |
3349 |
|
as if the <M::Node.appendChild> method were invoked in order. |
3350 |
|
|
3351 |
|
{LI:: |
3352 |
|
|
3353 |
|
- <A::Node.localName>::: <XE::s>. |
3354 |
|
|
3355 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3356 |
|
|
3357 |
|
- <A::Node.ownerDocument>::: The document. |
3358 |
|
|
3359 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3360 |
|
|
3361 |
|
} |
3362 |
|
|
3363 |
|
{LI:: |
3364 |
|
|
3365 |
|
- <A::Node.localName>::: <XE::name>. |
3366 |
|
|
3367 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3368 |
|
|
3369 |
|
- <A::Node.ownerDocument>::: The document. |
3370 |
|
|
3371 |
|
- <A::Node.textContent>::: <P::name>. |
3372 |
|
|
3373 |
|
} |
3374 |
|
|
3375 |
|
} |
3376 |
|
@@@PerlDef: |
3377 |
|
__DEEP{ |
3378 |
|
$r = $self-><M::Document.createElementNS> |
3379 |
|
(<Q::xdp|>, 'attlist'); |
3380 |
|
if (defined $name) { |
3381 |
|
$r-><M::Node.appendChild> |
3382 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3383 |
|
$r-><M::Node.appendChild> |
3384 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3385 |
|
} |
3386 |
|
}__; |
3387 |
|
|
3388 |
|
@@Test: |
3389 |
|
@@@QName: XDPDocument.createXDPAttlist.1.test |
3390 |
|
@@@PerlDef: |
3391 |
|
my $doc; |
3392 |
|
__CODE{createXDPDocumentForTest}__; |
3393 |
|
|
3394 |
|
my $el = $doc-><M::XDPDocument.createXDPAttlist> ('aname'); |
3395 |
|
|
3396 |
|
$test->id ('interface'); |
3397 |
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3398 |
|
|
3399 |
|
$test->id ('namespaceURI'); |
3400 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3401 |
|
|
3402 |
|
$test->id ('localName'); |
3403 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3404 |
|
|
3405 |
|
$test->id ('dtdText'); |
3406 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST aname>'); |
3407 |
|
@@Test: |
3408 |
|
@@@QName: XDPDocument.createXDPAttlist.2.test |
3409 |
|
@@@PerlDef: |
3410 |
|
my $doc; |
3411 |
|
__CODE{createXDPDocumentForTest}__; |
3412 |
|
|
3413 |
|
my $el = $doc-><M::XDPDocument.createXDPAttlist>; |
3414 |
|
|
3415 |
|
$test->id ('interface'); |
3416 |
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3417 |
|
|
3418 |
|
$test->id ('namespaceURI'); |
3419 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3420 |
|
|
3421 |
|
$test->id ('localName'); |
3422 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3423 |
|
|
3424 |
|
$test->id ('dtdText'); |
3425 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST>'); |
3426 |
|
|
3427 |
|
@Method: |
3428 |
|
@@Name: createXDPElement |
3429 |
|
@@enDesc: |
3430 |
|
Creates a <XE::xdp|element> element. |
3431 |
|
|
3432 |
|
{ISSUE:: |
3433 |
|
Should declared content parameter be added? |
3434 |
|
} |
3435 |
|
@@Param: |
3436 |
|
@@@Name: name |
3437 |
|
@@@Type: DOMString |
3438 |
|
@@@enDesc: |
3439 |
|
The name in the declaration. |
3440 |
|
@@@nullCase: |
3441 |
|
@@@@enDesc: |
3442 |
|
The declaration does not contain any name. |
3443 |
|
@@Return: |
3444 |
|
@@@Type: XDPElementElement |
3445 |
|
@@@enDesc: |
3446 |
|
The newly created element node. |
3447 |
|
|
3448 |
|
{P:: A new <IF::Element> node with following attributes |
3449 |
|
<kwd:MUST> be returned: |
3450 |
|
|
3451 |
|
- <A::Node.localName>::: <XE::element>. |
3452 |
|
|
3453 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3454 |
|
|
3455 |
|
- <A::Node.ownerDocument>::: The document. |
3456 |
|
|
3457 |
|
} |
3458 |
|
|
3459 |
|
{P:: If <P::name> is different from <DOM::null>, two |
3460 |
|
<IF::Element> nodes with following attributes |
3461 |
|
<kwd:MUST> be appended to the returned node |
3462 |
|
as if the <M::Node.appendChild> method were invoked in order. |
3463 |
|
|
3464 |
|
{LI:: |
3465 |
|
|
3466 |
|
- <A::Node.localName>::: <XE::s>. |
3467 |
|
|
3468 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3469 |
|
|
3470 |
|
- <A::Node.ownerDocument>::: The document. |
3471 |
|
|
3472 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3473 |
|
|
3474 |
|
} |
3475 |
|
|
3476 |
|
{LI:: |
3477 |
|
|
3478 |
|
- <A::Node.localName>::: <XE::name>. |
3479 |
|
|
3480 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3481 |
|
|
3482 |
|
- <A::Node.ownerDocument>::: The document. |
3483 |
|
|
3484 |
|
- <A::Node.textContent>::: <P::name>. |
3485 |
|
|
3486 |
|
} |
3487 |
|
|
3488 |
|
} |
3489 |
|
@@@PerlDef: |
3490 |
|
__DEEP{ |
3491 |
|
$r = $self-><M::Document.createElementNS> |
3492 |
|
(<Q::xdp|>, 'element'); |
3493 |
|
if (defined $name) { |
3494 |
|
$r-><M::Node.appendChild> |
3495 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3496 |
|
$r-><M::Node.appendChild> |
3497 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3498 |
|
} |
3499 |
|
}__; |
3500 |
|
|
3501 |
|
@@Test: |
3502 |
|
@@@QName: XDPDocument.createXDPElement.1.test |
3503 |
|
@@@PerlDef: |
3504 |
|
my $doc; |
3505 |
|
__CODE{createXDPDocumentForTest}__; |
3506 |
|
|
3507 |
|
my $el = $doc-><M::XDPDocument.createXDPElement> ('aname'); |
3508 |
|
|
3509 |
|
$test->id ('interface'); |
3510 |
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3511 |
|
|
3512 |
|
$test->id ('namespaceURI'); |
3513 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3514 |
|
|
3515 |
|
$test->id ('localName'); |
3516 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3517 |
|
|
3518 |
|
$test->id ('dtdText'); |
3519 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT aname>'); |
3520 |
|
@@Test: |
3521 |
|
@@@QName: XDPDocument.createXDPElement.2.test |
3522 |
|
@@@PerlDef: |
3523 |
|
my $doc; |
3524 |
|
__CODE{createXDPDocumentForTest}__; |
3525 |
|
|
3526 |
|
my $el = $doc-><M::XDPDocument.createXDPElement>; |
3527 |
|
|
3528 |
|
$test->id ('interface'); |
3529 |
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3530 |
|
|
3531 |
|
$test->id ('namespaceURI'); |
3532 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3533 |
|
|
3534 |
|
$test->id ('localName'); |
3535 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3536 |
|
|
3537 |
|
$test->id ('dtdText'); |
3538 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT>'); |
3539 |
##XDPDocument |
##XDPDocument |
3540 |
|
|
3541 |
IFClsDef: |
IFClsDef: |