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 |
242 |
@@@@: DISLang|Class |
@@@@: DISLang|Class |
243 |
@@@ForCheck: ManakaiDOM|ForClass |
@@@ForCheck: ManakaiDOM|ForClass |
244 |
@@Implement: |
@@Implement: |
245 |
@@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF |
@@@@: ||+||ManakaiDOM|ForIF |
246 |
@@@ContentType: DISCore|TFPQNames |
@@@ContentType: DISCore|TFPQNames |
247 |
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM |
@@@ForCheck: ManakaiDOM|ForClass |
248 |
@@Implement: |
@@Implement: |
249 |
@@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF |
@@@@: ||+||ManakaiDOM|ForIF |
250 |
@@@ContentType: DISCore|TFPQNames |
@@@ContentType: DISCore|TFPQNames |
251 |
@@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest |
@@@ForCheck: ManakaiDOM|ForClass |
252 |
|
|
253 |
@@f:implements: XDPFeature30 |
@@f:implements: XDPFeature30 |
254 |
|
|
330 |
ResourceDef: |
ResourceDef: |
331 |
@QName: Document |
@QName: Document |
332 |
@AliasFor: td|Document |
@AliasFor: td|Document |
|
@For: ManakaiDOM|DOM |
|
333 |
|
|
334 |
ResourceDef: |
ResourceDef: |
335 |
@QName: Element |
@QName: Element |
336 |
@AliasFor: te|Element |
@AliasFor: te|Element |
|
@For: ManakaiDOM|DOM |
|
337 |
|
|
338 |
ResourceDef: |
ResourceDef: |
339 |
@QName: Attr |
@QName: Attr |
340 |
@AliasFor: te|Attr |
@AliasFor: te|Attr |
|
@For: ManakaiDOM|DOM |
|
341 |
|
|
342 |
ResourceDef: |
ResourceDef: |
343 |
@QName: Text |
@QName: Text |
344 |
@AliasFor: te|Text |
@AliasFor: te|Text |
|
@For: ManakaiDOM|DOM |
|
345 |
|
|
346 |
ResourceDef: |
ResourceDef: |
347 |
@QName: DOMString |
@QName: DOMString |
348 |
@AliasFor: DOMMain|DOMString |
@AliasFor: DOMMain|DOMString |
|
@For: ManakaiDOM|DOM |
|
349 |
|
|
350 |
ResourceDef: |
ResourceDef: |
351 |
@QName: boolean |
@QName: boolean |
354 |
ResourceDef: |
ResourceDef: |
355 |
@QName: Node |
@QName: Node |
356 |
@AliasFor: tc|Node |
@AliasFor: tc|Node |
|
@For: ManakaiDOM|ManakaiDOM |
|
357 |
|
|
358 |
ResourceDef: |
ResourceDef: |
359 |
@QName: NodeFilter |
@QName: NodeFilter |
360 |
@AliasFor: trv|NodeFilter |
@AliasFor: trv|NodeFilter |
|
@For: ManakaiDOM|DOM2 |
|
361 |
|
|
362 |
ResourceDef: |
ResourceDef: |
363 |
@QName: TreeWalker |
@QName: TreeWalker |
364 |
@AliasFor: trv|TreeWalker |
@AliasFor: trv|TreeWalker |
|
@For: ManakaiDOM|DOM2 |
|
365 |
|
|
366 |
ElementTypeBinding: |
ElementTypeBinding: |
367 |
@Name: enDesc |
@Name: enDesc |
435 |
@IFQName: XDPDocument |
@IFQName: XDPDocument |
436 |
@ClsQName: ManakaiDOMXDPDocument |
@ClsQName: ManakaiDOMXDPDocument |
437 |
|
|
438 |
@IFISA: Document |
@domperl:implementedByObjectsOf: Document |
439 |
@ClsISA: td|ManakaiDOMDocument |
@domperl:classImplementedByObjectsOf: td|ManakaiDOMDocument |
440 |
|
|
441 |
@f:implements: XDPFeature30 |
@f:implements: XDPFeature30 |
442 |
@f:provides: |
@f:provides: |
461 |
<IFName::f|GetFeature>, |
<IFName::f|GetFeature>, |
462 |
) { |
) { |
463 |
$test->id ($_); |
$test->id ($_); |
464 |
$test->assert_true (<Class::ManakaiDOMXDPDocument>->isa ($_)); |
$test->assert_true (<Class::td|ManakaiDOMDocument>->isa ($_)); |
465 |
} |
} |
466 |
|
|
467 |
@Test: |
@Test: |
513 |
|
|
514 |
} |
} |
515 |
|
|
516 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
517 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
518 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
519 |
@@@PerlDef: |
@@@PerlDef: |
600 |
|
|
601 |
} |
} |
602 |
|
|
603 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
604 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
605 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
606 |
@@@PerlDef: |
@@@PerlDef: |
687 |
|
|
688 |
} |
} |
689 |
|
|
690 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
691 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
692 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
693 |
@@@PerlDef: |
@@@PerlDef: |
773 |
|
|
774 |
} |
} |
775 |
|
|
776 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
777 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
778 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
779 |
@@@PerlDef: |
@@@PerlDef: |
830 |
|
|
831 |
@Method: |
@Method: |
832 |
@@Name: createXDPRNIKeyword |
@@Name: createXDPRNIKeyword |
833 |
|
@@dlp:methodName: create_xdp_rni_keyword |
834 |
@@enDesc: |
@@enDesc: |
835 |
Creates a <XE::xdp|rni-keyword> element. |
Creates a <XE::xdp|rni-keyword> element. |
836 |
@@Param: |
@@Param: |
860 |
|
|
861 |
} |
} |
862 |
|
|
863 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
864 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
865 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
866 |
@@@PerlDef: |
@@@PerlDef: |
946 |
|
|
947 |
} |
} |
948 |
|
|
949 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
950 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
951 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
952 |
@@@PerlDef: |
@@@PerlDef: |
1032 |
|
|
1033 |
} |
} |
1034 |
|
|
1035 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
1036 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
1037 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
1038 |
@@@PerlDef: |
@@@PerlDef: |
1119 |
|
|
1120 |
} |
} |
1121 |
|
|
1122 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
1123 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
1124 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
1125 |
@@@PerlDef: |
@@@PerlDef: |
1207 |
|
|
1208 |
} |
} |
1209 |
|
|
1210 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
1211 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
1212 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
1213 |
@@@PerlDef: |
@@@PerlDef: |
1295 |
|
|
1296 |
} |
} |
1297 |
|
|
1298 |
If <IF::Text> nodes are created, its |
If a <IF::Text> node is created, its |
1299 |
<A::Text.isElementContentWhitespace> attribute value |
<A::Text.isElementContentWhitespace> attribute value |
1300 |
<kwd:MUST> be set to <DOM::false>. |
<kwd:MUST> be set to <DOM::false>. |
1301 |
@@@PerlDef: |
@@@PerlDef: |
1351 |
|
|
1352 |
$test->id ('dtdText'); |
$test->id ('dtdText'); |
1353 |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '""'); |
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '""'); |
1354 |
|
|
1355 |
|
@Method: |
1356 |
|
@@Name: createXDPCharRef |
1357 |
|
@@enDesc: |
1358 |
|
Creates an <XE::xdp|hcr> element. |
1359 |
|
@@Param: |
1360 |
|
@@@Name: value |
1361 |
|
@@@Type: unsignedLong |
1362 |
|
@@@enDesc: |
1363 |
|
The code point of the character represented |
1364 |
|
by the element to create. |
1365 |
|
@@Return: |
1366 |
|
@@@Type: XDPHCRElement |
1367 |
|
@@@enDesc: |
1368 |
|
The newly created element node. |
1369 |
|
|
1370 |
|
{P:: A new <IF::Element> node with following attributes |
1371 |
|
<kwd:MUST> be returned: |
1372 |
|
|
1373 |
|
- <A::Node.localName>::: <XE::hcr>. |
1374 |
|
|
1375 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1376 |
|
|
1377 |
|
- <A::Node.ownerDocument>::: The document. |
1378 |
|
|
1379 |
|
- <A::Node.textContent>::: A hexadecimal representation |
1380 |
|
of the <P::value>, in upper case. |
1381 |
|
|
1382 |
|
} |
1383 |
|
|
1384 |
|
If a <IF::Text> node is created, its |
1385 |
|
<A::Text.isElementContentWhitespace> attribute value |
1386 |
|
<kwd:MUST> be set to <DOM::false>. |
1387 |
|
@@@PerlDef: |
1388 |
|
__DEEP{ |
1389 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'hcr'); |
1390 |
|
$r-><AS::Node.textContent> (sprintf '%04X', $value); |
1391 |
|
}__; |
1392 |
|
|
1393 |
|
@@Test: |
1394 |
|
@@@QName: XDPDocument.createXDPCharRef.1.test |
1395 |
|
@@@PerlDef: |
1396 |
|
my $doc; |
1397 |
|
__CODE{createXDPDocumentForTest}__; |
1398 |
|
|
1399 |
|
my $el = $doc-><M::XDPDocument.createXDPCharRef> (0x4E00); |
1400 |
|
|
1401 |
|
$test->id ('interface'); |
1402 |
|
$test->assert_isa ($el, <IFName::XDPHCRElement>); |
1403 |
|
|
1404 |
|
$test->id ('namespaceURI'); |
1405 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1406 |
|
|
1407 |
|
$test->id ('localName'); |
1408 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'hcr'); |
1409 |
|
|
1410 |
|
$test->id ('textContent'); |
1411 |
|
$test->assert_equals ($el-><AG::Node.textContent>, '4E00'); |
1412 |
|
|
1413 |
|
$test->id ('dtdText'); |
1414 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '一'); |
1415 |
|
|
1416 |
|
@Method: |
1417 |
|
@@Name: createXDPPERef |
1418 |
|
@@dlp:methodName: create_xdp_peref |
1419 |
|
@@enDesc: |
1420 |
|
Creates a <XE::xdp|peref> element. |
1421 |
|
@@Param: |
1422 |
|
@@@Name: value |
1423 |
|
@@@Type: DOMString |
1424 |
|
@@@enDesc: |
1425 |
|
The value of the element, i.e. the name of the |
1426 |
|
parameter entity. |
1427 |
|
@@@nullCase: |
1428 |
|
@@@@enDesc: |
1429 |
|
Same as an empty string. |
1430 |
|
@@Return: |
1431 |
|
@@@Type: XDPPERefElement |
1432 |
|
@@@enDesc: |
1433 |
|
The newly created element node. |
1434 |
|
|
1435 |
|
{P:: A new <IF::Element> node with following attributes |
1436 |
|
<kwd:MUST> be returned: |
1437 |
|
|
1438 |
|
- <A::Node.localName>::: <XE::peref>. |
1439 |
|
|
1440 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1441 |
|
|
1442 |
|
- <A::Node.ownerDocument>::: The document. |
1443 |
|
|
1444 |
|
- <A::Node.textContent>::: <P::value>, or an empty |
1445 |
|
string if <P::value> is <DOM::null>. |
1446 |
|
|
1447 |
|
} |
1448 |
|
|
1449 |
|
If a <IF::Text> node is created, its |
1450 |
|
<A::Text.isElementContentWhitespace> attribute value |
1451 |
|
<kwd:MUST> be set to <DOM::false>. |
1452 |
|
@@@PerlDef: |
1453 |
|
__DEEP{ |
1454 |
|
$r = $self-><M::Document.createElementNS> |
1455 |
|
(<Q::xdp|>, 'peref'); |
1456 |
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1457 |
|
}__; |
1458 |
|
|
1459 |
|
@@Test: |
1460 |
|
@@@QName: XDPDocument.createXDPPERef.1.test |
1461 |
|
@@@PerlDef: |
1462 |
|
my $doc; |
1463 |
|
__CODE{createXDPDocumentForTest}__; |
1464 |
|
|
1465 |
|
my $value = q<pename>; |
1466 |
|
my $el = $doc-><M::XDPDocument.createXDPPERef> ($value); |
1467 |
|
|
1468 |
|
$test->id ('interface'); |
1469 |
|
$test->assert_isa ($el, <IFName::XDPPERefElement>); |
1470 |
|
|
1471 |
|
$test->id ('namespaceURI'); |
1472 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1473 |
|
|
1474 |
|
$test->id ('localName'); |
1475 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'peref'); |
1476 |
|
|
1477 |
|
$test->id ('textContent'); |
1478 |
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1479 |
|
|
1480 |
|
$test->id ('dtdText'); |
1481 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '%'.$value.';'); |
1482 |
|
@@Test: |
1483 |
|
@@@QName: XDPDocument.createXDPPERef.2.test |
1484 |
|
@@@PerlDef: |
1485 |
|
my $doc; |
1486 |
|
__CODE{createXDPDocumentForTest}__; |
1487 |
|
|
1488 |
|
my $el = $doc-><M::XDPDocument.createXDPPERef> (null); |
1489 |
|
|
1490 |
|
$test->id ('interface'); |
1491 |
|
$test->assert_isa ($el, <IFName::XDPPERefElement>); |
1492 |
|
|
1493 |
|
$test->id ('namespaceURI'); |
1494 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1495 |
|
|
1496 |
|
$test->id ('localName'); |
1497 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'peref'); |
1498 |
|
|
1499 |
|
$test->id ('textContent'); |
1500 |
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1501 |
|
|
1502 |
|
$test->id ('dtdText'); |
1503 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '%;'); |
1504 |
|
|
1505 |
|
@Method: |
1506 |
|
@@Name: createXDPGERef |
1507 |
|
@@dlp:methodName: create_xdp_geref |
1508 |
|
@@enDesc: |
1509 |
|
Creates a <XE::xdp|geref> element. |
1510 |
|
@@Param: |
1511 |
|
@@@Name: value |
1512 |
|
@@@Type: DOMString |
1513 |
|
@@@enDesc: |
1514 |
|
The value of the element, i.e. the name of the |
1515 |
|
general entity. |
1516 |
|
@@@nullCase: |
1517 |
|
@@@@enDesc: |
1518 |
|
Same as an empty string. |
1519 |
|
@@Return: |
1520 |
|
@@@Type: XDPGERefElement |
1521 |
|
@@@enDesc: |
1522 |
|
The newly created element node. |
1523 |
|
|
1524 |
|
{P:: A new <IF::Element> node with following attributes |
1525 |
|
<kwd:MUST> be returned: |
1526 |
|
|
1527 |
|
- <A::Node.localName>::: <XE::geref>. |
1528 |
|
|
1529 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1530 |
|
|
1531 |
|
- <A::Node.ownerDocument>::: The document. |
1532 |
|
|
1533 |
|
- <A::Node.textContent>::: <P::value>, or an empty |
1534 |
|
string if <P::value> is <DOM::null>. |
1535 |
|
|
1536 |
|
} |
1537 |
|
|
1538 |
|
If a <IF::Text> node is created, its |
1539 |
|
<A::Text.isElementContentWhitespace> attribute value |
1540 |
|
<kwd:MUST> be set to <DOM::false>. |
1541 |
|
@@@PerlDef: |
1542 |
|
__DEEP{ |
1543 |
|
$r = $self-><M::Document.createElementNS> |
1544 |
|
(<Q::xdp|>, 'geref'); |
1545 |
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
1546 |
|
}__; |
1547 |
|
|
1548 |
|
@@Test: |
1549 |
|
@@@QName: XDPDocument.createXDPGERef.1.test |
1550 |
|
@@@PerlDef: |
1551 |
|
my $doc; |
1552 |
|
__CODE{createXDPDocumentForTest}__; |
1553 |
|
|
1554 |
|
my $value = q<pename>; |
1555 |
|
my $el = $doc-><M::XDPDocument.createXDPGERef> ($value); |
1556 |
|
|
1557 |
|
$test->id ('interface'); |
1558 |
|
$test->assert_isa ($el, <IFName::XDPGERefElement>); |
1559 |
|
|
1560 |
|
$test->id ('namespaceURI'); |
1561 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1562 |
|
|
1563 |
|
$test->id ('localName'); |
1564 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'geref'); |
1565 |
|
|
1566 |
|
$test->id ('textContent'); |
1567 |
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
1568 |
|
|
1569 |
|
$test->id ('dtdText'); |
1570 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '&'.$value.';'); |
1571 |
|
@@Test: |
1572 |
|
@@@QName: XDPDocument.createXDPGERef.2.test |
1573 |
|
@@@PerlDef: |
1574 |
|
my $doc; |
1575 |
|
__CODE{createXDPDocumentForTest}__; |
1576 |
|
|
1577 |
|
my $el = $doc-><M::XDPDocument.createXDPGERef> (null); |
1578 |
|
|
1579 |
|
$test->id ('interface'); |
1580 |
|
$test->assert_isa ($el, <IFName::XDPGERefElement>); |
1581 |
|
|
1582 |
|
$test->id ('namespaceURI'); |
1583 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1584 |
|
|
1585 |
|
$test->id ('localName'); |
1586 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'geref'); |
1587 |
|
|
1588 |
|
$test->id ('textContent'); |
1589 |
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
1590 |
|
|
1591 |
|
$test->id ('dtdText'); |
1592 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '&;'); |
1593 |
|
|
1594 |
|
@Method: |
1595 |
|
@@Name: createXDPPAttr |
1596 |
|
@@dlp:methodName: create_xdp_pattr |
1597 |
|
@@enDesc: |
1598 |
|
Creates a <XE::xdp|pattr> element. |
1599 |
|
@@Param: |
1600 |
|
@@@Name: name |
1601 |
|
@@@Type: DOMString |
1602 |
|
@@@enDesc: |
1603 |
|
The name of the pseudo-attribute. |
1604 |
|
@@@nullCase: |
1605 |
|
@@@@enDesc: |
1606 |
|
Same as an empty string. |
1607 |
|
@@Param: |
1608 |
|
@@@Name: value |
1609 |
|
@@@Type: DOMString |
1610 |
|
@@@enDesc: |
1611 |
|
The value of the pseudo-attribute. |
1612 |
|
@@@nullCase: |
1613 |
|
@@@@enDesc: |
1614 |
|
Same as an empty string. |
1615 |
|
@@Return: |
1616 |
|
@@@Type: XDPPAttrElement |
1617 |
|
@@@enDesc: |
1618 |
|
The newly created element node. |
1619 |
|
|
1620 |
|
{P:: A new <IF::Element> node with following attributes |
1621 |
|
<kwd:MUST> be returned: |
1622 |
|
|
1623 |
|
- <A::Node.localName>::: <XE::pattr>. |
1624 |
|
|
1625 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1626 |
|
|
1627 |
|
- <A::Node.ownerDocument>::: The document. |
1628 |
|
|
1629 |
|
{LI:: <A::Node.childNodes>::: A new <IF::tc|NodeList> with |
1630 |
|
three nodes in this order: |
1631 |
|
|
1632 |
|
{OLI:: |
1633 |
|
|
1634 |
|
- <A::Node.localName>::: <XE::name>. |
1635 |
|
|
1636 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1637 |
|
|
1638 |
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1639 |
|
|
1640 |
|
- <A::Node.ownerDocument>::: The document. |
1641 |
|
|
1642 |
|
- <A::Node.textContent>::: <P::name>, or an empty |
1643 |
|
string if <P::name> is <DOM::null>. |
1644 |
|
|
1645 |
|
} |
1646 |
|
|
1647 |
|
{OLI:: |
1648 |
|
|
1649 |
|
- <A::Node.localName>::: <XE::delimiter>. |
1650 |
|
|
1651 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1652 |
|
|
1653 |
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1654 |
|
|
1655 |
|
- <A::Node.ownerDocument>::: The document. |
1656 |
|
|
1657 |
|
- <A::Node.textContent>::: <XML::=>. |
1658 |
|
|
1659 |
|
} |
1660 |
|
|
1661 |
|
{OLI:: |
1662 |
|
|
1663 |
|
- <A::Node.localName>::: <XE::attr-literal>. |
1664 |
|
|
1665 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1666 |
|
|
1667 |
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1668 |
|
|
1669 |
|
- <A::Node.ownerDocument>::: The document. |
1670 |
|
|
1671 |
|
- <A::Node.textContent>::: <P::value>, or an empty |
1672 |
|
string if <P::value> is <DOM::null>. |
1673 |
|
|
1674 |
|
} |
1675 |
|
|
1676 |
|
} |
1677 |
|
|
1678 |
|
} |
1679 |
|
|
1680 |
|
If a <IF::Text> node is created, its |
1681 |
|
<A::Text.isElementContentWhitespace> attribute value |
1682 |
|
<kwd:MUST> be set to <DOM::false>. |
1683 |
|
@@@PerlDef: |
1684 |
|
__DEEP{ |
1685 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'pattr'); |
1686 |
|
my $name_el = $self-><M::XDPDocument.createXDPName> ($name); |
1687 |
|
$r-><M::Node.appendChild> ($name_el); |
1688 |
|
my $vi_el = $self-><M::XDPDocument.createXDPDelimiter> ('='); |
1689 |
|
$r-><M::Node.appendChild> ($vi_el); |
1690 |
|
my $value_el = $self-><M::XDPDocument.createXDPAttrLiteral> ($value); |
1691 |
|
$r-><M::Node.appendChild> ($value_el); |
1692 |
|
}__; |
1693 |
|
|
1694 |
|
@@Test: |
1695 |
|
@@@QName: XDPDocument.createXDPPAttr.1.test |
1696 |
|
@@@PerlDef: |
1697 |
|
my $doc; |
1698 |
|
__CODE{createXDPDocumentForTest}__; |
1699 |
|
|
1700 |
|
my $el = $doc-><M::XDPDocument.createXDPPAttr> ('paname' => 'pavalue'); |
1701 |
|
|
1702 |
|
$test->id ('interface'); |
1703 |
|
$test->assert_isa ($el, <IFName::XDPPAttrElement>); |
1704 |
|
|
1705 |
|
$test->id ('namespaceURI'); |
1706 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1707 |
|
|
1708 |
|
$test->id ('localName'); |
1709 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'pattr'); |
1710 |
|
|
1711 |
|
$test->id ('dtdText'); |
1712 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, 'paname="pavalue"'); |
1713 |
|
@@Test: |
1714 |
|
@@@QName: XDPDocument.createXDPPAttr.2.test |
1715 |
|
@@@PerlDef: |
1716 |
|
my $doc; |
1717 |
|
__CODE{createXDPDocumentForTest}__; |
1718 |
|
|
1719 |
|
my $el = $doc-><M::XDPDocument.createXDPPAttr> (null, null); |
1720 |
|
|
1721 |
|
$test->id ('interface'); |
1722 |
|
$test->assert_isa ($el, <IFName::XDPPAttrElement>); |
1723 |
|
|
1724 |
|
$test->id ('namespaceURI'); |
1725 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1726 |
|
|
1727 |
|
$test->id ('localName'); |
1728 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'pattr'); |
1729 |
|
|
1730 |
|
$test->id ('dtdText'); |
1731 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '=""'); |
1732 |
|
|
1733 |
|
@Method: |
1734 |
|
@@Name: createXDPTextDecl |
1735 |
|
@@enDesc: |
1736 |
|
Creates a <XE::xdp|text-decl> element. |
1737 |
|
@@Param: |
1738 |
|
@@@Name: version |
1739 |
|
@@@Type: DOMString |
1740 |
|
@@@enDesc: |
1741 |
|
The value of the <XA::version> pseudo-attribute of |
1742 |
|
the text declaration. |
1743 |
|
@@@nullCase: |
1744 |
|
@@@@enDesc: |
1745 |
|
If <P::encoding> is also <DOM::null>, it is treated |
1746 |
|
as if <XML::1.0> is specified. Otherwise, |
1747 |
|
no <XA::version> pseudo-attribute will appear. |
1748 |
|
@@Param: |
1749 |
|
@@@Name: encoding |
1750 |
|
@@@Type: DOMString |
1751 |
|
@@@enDesc: |
1752 |
|
The value of the <XE::encoding> pseudo-attribute |
1753 |
|
of the text declaration. |
1754 |
|
@@@nullCase: |
1755 |
|
@@@@enDesc: |
1756 |
|
No <XA::encoding> pseudo-attribute will appear. |
1757 |
|
@@Return: |
1758 |
|
@@@Type: XDPTextDeclElement |
1759 |
|
@@@enDesc: |
1760 |
|
The newly created element node. |
1761 |
|
|
1762 |
|
{P:: A new <IF::Element> node with following attributes |
1763 |
|
<kwd:MUST> be returned: |
1764 |
|
|
1765 |
|
- <A::Node.localName>::: <XE::text-decl>. |
1766 |
|
|
1767 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1768 |
|
|
1769 |
|
- <A::Node.ownerDocument>::: The document. |
1770 |
|
|
1771 |
|
} |
1772 |
|
|
1773 |
|
{P:: In addition, the returned node <kwd:MUST> have following |
1774 |
|
child nodes in order: |
1775 |
|
|
1776 |
|
= If <P::version> is different from <DOM::null> and / or |
1777 |
|
if <P::encoding> is <DOM::null>, an <CODE::S> node. |
1778 |
|
|
1779 |
|
= If <P::version> is different from <DOM::null> and / or |
1780 |
|
if <P::encoding> is <DOM::null>, a pseudo-attribute |
1781 |
|
node whose <VAR::name> is <XA::version> and |
1782 |
|
whose <VAR::value> is <P::version>, if it is |
1783 |
|
not <DOM::null>, or <XML::1.0>, otherwise. |
1784 |
|
|
1785 |
|
= An <CODE::S> node. |
1786 |
|
|
1787 |
|
= If <P::encoding> is different from <DOM::null>, |
1788 |
|
a pseudo-attribute node whose <VAR::name> is |
1789 |
|
<XA::encoding> and whose <VAR::value> is <P::encoding>. |
1790 |
|
|
1791 |
|
} |
1792 |
|
|
1793 |
|
{P:: <DFN::An <CODE::S> node> <kwd:MUST> be a <IF::Node> |
1794 |
|
that contains following attribute values: |
1795 |
|
|
1796 |
|
- <A::Node.localName>::: <XE::s>. |
1797 |
|
|
1798 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1799 |
|
|
1800 |
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1801 |
|
|
1802 |
|
- <A::Node.ownerDocument>::: The document. |
1803 |
|
|
1804 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
1805 |
|
|
1806 |
|
} |
1807 |
|
|
1808 |
|
<DFN::A pseudo-attribute node> with <VAR::name> and |
1809 |
|
<VAR::value> <kwd:MUST> be a <IF::Node> that would be |
1810 |
|
returned when the <A::XDPDocument.createXDPPAttr> method |
1811 |
|
on the document with parameters <VAR::name> and <VAR::value> |
1812 |
|
were invoked. |
1813 |
|
|
1814 |
|
If a <IF::Text> node is created, its |
1815 |
|
<A::Text.isElementContentWhitespace> attribute value |
1816 |
|
<kwd:MUST> be set to <DOM::false>. |
1817 |
|
@@@PerlDef: |
1818 |
|
__DEEP{ |
1819 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'text-decl'); |
1820 |
|
if (defined $version or not defined $encoding) { |
1821 |
|
$r-><M::Node.appendChild> ($self-><M::XDPDocument.createXDPS> (' ')); |
1822 |
|
my $ver_el = $self-><M::XDPDocument.createXDPPAttr> |
1823 |
|
(version => defined $version |
1824 |
|
? $version : '1.0'); |
1825 |
|
$r-><M::Node.appendChild> ($ver_el); |
1826 |
|
} |
1827 |
|
if (defined $encoding) { |
1828 |
|
$r-><M::Node.appendChild> ($self-><M::XDPDocument.createXDPS> (' ')); |
1829 |
|
my $enc_el = $self-><M::XDPDocument.createXDPPAttr> |
1830 |
|
(encoding => $encoding); |
1831 |
|
$r-><M::Node.appendChild> ($enc_el); |
1832 |
|
} |
1833 |
|
}__; |
1834 |
|
|
1835 |
|
@@Test: |
1836 |
|
@@@QName: XDPDocument.createXDPTextDecl.1.test |
1837 |
|
@@@PerlDef: |
1838 |
|
my $doc; |
1839 |
|
__CODE{createXDPDocumentForTest}__; |
1840 |
|
|
1841 |
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl> ('1.1', 'utf-8'); |
1842 |
|
|
1843 |
|
$test->id ('interface'); |
1844 |
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1845 |
|
|
1846 |
|
$test->id ('namespaceURI'); |
1847 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1848 |
|
|
1849 |
|
$test->id ('localName'); |
1850 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1851 |
|
|
1852 |
|
$test->id ('dtdText'); |
1853 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1854 |
|
'<?xml version="1.1" encoding="utf-8"?>'); |
1855 |
|
@@Test: |
1856 |
|
@@@QName: XDPDocument.createXDPTextDecl.2.test |
1857 |
|
@@@PerlDef: |
1858 |
|
my $doc; |
1859 |
|
__CODE{createXDPDocumentForTest}__; |
1860 |
|
|
1861 |
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl> ('1.1'); |
1862 |
|
|
1863 |
|
$test->id ('interface'); |
1864 |
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1865 |
|
|
1866 |
|
$test->id ('namespaceURI'); |
1867 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1868 |
|
|
1869 |
|
$test->id ('localName'); |
1870 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1871 |
|
|
1872 |
|
$test->id ('dtdText'); |
1873 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1874 |
|
'<?xml version="1.1"?>'); |
1875 |
|
@@Test: |
1876 |
|
@@@QName: XDPDocument.createXDPTextDecl.3.test |
1877 |
|
@@@PerlDef: |
1878 |
|
my $doc; |
1879 |
|
__CODE{createXDPDocumentForTest}__; |
1880 |
|
|
1881 |
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl> (null, 'utf-8'); |
1882 |
|
|
1883 |
|
$test->id ('interface'); |
1884 |
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1885 |
|
|
1886 |
|
$test->id ('namespaceURI'); |
1887 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1888 |
|
|
1889 |
|
$test->id ('localName'); |
1890 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1891 |
|
|
1892 |
|
$test->id ('dtdText'); |
1893 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1894 |
|
'<?xml encoding="utf-8"?>'); |
1895 |
|
@@Test: |
1896 |
|
@@@QName: XDPDocument.createXDPTextDecl.4.test |
1897 |
|
@@@PerlDef: |
1898 |
|
my $doc; |
1899 |
|
__CODE{createXDPDocumentForTest}__; |
1900 |
|
|
1901 |
|
my $el = $doc-><M::XDPDocument.createXDPTextDecl>; |
1902 |
|
|
1903 |
|
$test->id ('interface'); |
1904 |
|
$test->assert_isa ($el, <IFName::XDPTextDeclElement>); |
1905 |
|
|
1906 |
|
$test->id ('namespaceURI'); |
1907 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
1908 |
|
|
1909 |
|
$test->id ('localName'); |
1910 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'text-decl'); |
1911 |
|
|
1912 |
|
$test->id ('dtdText'); |
1913 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
1914 |
|
'<?xml version="1.0"?>'); |
1915 |
|
|
1916 |
|
@Method: |
1917 |
|
@@Name: createXDPPI |
1918 |
|
@@dlp:methodName: create_xdp_pi |
1919 |
|
@@enDesc: |
1920 |
|
Creates a <XE::xdp|pi> element. |
1921 |
|
@@Param: |
1922 |
|
@@@Name: target |
1923 |
|
@@@Type: DOMString |
1924 |
|
@@@enDesc: |
1925 |
|
The target of the processing instruction. |
1926 |
|
@@@nullCase: |
1927 |
|
@@@@enDesc: |
1928 |
|
Same as an empty string. |
1929 |
|
@@Param: |
1930 |
|
@@@Name: data |
1931 |
|
@@@Type: DOMString |
1932 |
|
@@@enDesc: |
1933 |
|
The content of the processing instruction. |
1934 |
|
@@@nullCase: |
1935 |
|
@@@@enDesc: |
1936 |
|
No <CODE::S> is inserted after the target. |
1937 |
|
@@Return: |
1938 |
|
@@@Type: XDPPIElement |
1939 |
|
@@@enDesc: |
1940 |
|
The newly created element node. |
1941 |
|
|
1942 |
|
{P:: A new <IF::Element> node with following attributes |
1943 |
|
<kwd:MUST> be returned: |
1944 |
|
|
1945 |
|
- <A::Node.localName>::: <XE::pi>. |
1946 |
|
|
1947 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1948 |
|
|
1949 |
|
- <A::Node.ownerDocument>::: The document. |
1950 |
|
|
1951 |
|
} |
1952 |
|
|
1953 |
|
If the <P::value> is different from <DOM::null>, |
1954 |
|
the returned value <kwd:MUST> contain two or three child |
1955 |
|
element nodes: the target node, an <CODE::S> node, |
1956 |
|
and if the length of <P::value> is greater than zero, |
1957 |
|
the data node. Otherwise, it <kwd:MUST> contain |
1958 |
|
one child element node: the target node. |
1959 |
|
|
1960 |
|
{P:: <DFM::The target node> <kwd:MUST> be a <IF::Node> |
1961 |
|
that contains following attribute values: |
1962 |
|
|
1963 |
|
- <A::Node.localName>::: <XE::name>. |
1964 |
|
|
1965 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1966 |
|
|
1967 |
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1968 |
|
|
1969 |
|
- <A::Node.ownerDocument>::: The document. |
1970 |
|
|
1971 |
|
- <A::Node.textContent>::: <P::target>, or an empty |
1972 |
|
string if <P::target> is <DOM::null>. |
1973 |
|
|
1974 |
|
} |
1975 |
|
|
1976 |
|
{P:: <DFN::An <CODE::S> node> <kwd:MUST> be a <IF::Node> |
1977 |
|
that contains following attribute values: |
1978 |
|
|
1979 |
|
- <A::Node.localName>::: <XE::s>. |
1980 |
|
|
1981 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
1982 |
|
|
1983 |
|
- <A::Node.nodeType>::: <C::Node.ELEMENT_NODE>. |
1984 |
|
|
1985 |
|
- <A::Node.ownerDocument>::: The document. |
1986 |
|
|
1987 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
1988 |
|
|
1989 |
|
} |
1990 |
|
|
1991 |
|
{P:: <DFM::The data node> <kwd:MUST> be a <IF::Node> |
1992 |
|
that contains following attribute values: |
1993 |
|
|
1994 |
|
- <A::Node.nodeType>::: <C::Node.TEXT_NODE>. |
1995 |
|
|
1996 |
|
- <A::Node.ownerDocument>::: The document. |
1997 |
|
|
1998 |
|
- <A::Node.textContent>::: <P::data>. |
1999 |
|
|
2000 |
|
} |
2001 |
|
|
2002 |
|
If a <IF::Text> node are created, its |
2003 |
|
<A::Text.isElementContentWhitespace> attribute value |
2004 |
|
<kwd:MUST> be set to <DOM::false>. |
2005 |
|
@@@PerlDef: |
2006 |
|
__DEEP{ |
2007 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'pi'); |
2008 |
|
$r-><M::Node.appendChild> |
2009 |
|
($self-><M::XDPDocument.createXDPName> ($target)); |
2010 |
|
if (defined $data) { |
2011 |
|
$r-><M::Node.appendChild> ($self-><M::XDPDocument.createXDPS> (' ')); |
2012 |
|
$r-><M::Node.manakaiAppendText> ($data) if length $data; |
2013 |
|
} |
2014 |
|
}__; |
2015 |
|
|
2016 |
|
@@Test: |
2017 |
|
@@@QName: XDPDocument.createXDPPI.1.test |
2018 |
|
@@@PerlDef: |
2019 |
|
my $doc; |
2020 |
|
__CODE{createXDPDocumentForTest}__; |
2021 |
|
|
2022 |
|
my $el = $doc-><M::XDPDocument.createXDPPI> ('pitarget', 'pidata'); |
2023 |
|
|
2024 |
|
$test->id ('interface'); |
2025 |
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2026 |
|
|
2027 |
|
$test->id ('namespaceURI'); |
2028 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2029 |
|
|
2030 |
|
$test->id ('localName'); |
2031 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2032 |
|
|
2033 |
|
$test->id ('dtdText'); |
2034 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2035 |
|
'<?pitarget pidata?>'); |
2036 |
|
|
2037 |
|
$test->id ('length'); |
2038 |
|
$test->assert_num_equals |
2039 |
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2040 |
|
expected_value => 3); |
2041 |
|
@@Test: |
2042 |
|
@@@QName: XDPDocument.createXDPPI.2.test |
2043 |
|
@@@PerlDef: |
2044 |
|
my $doc; |
2045 |
|
__CODE{createXDPDocumentForTest}__; |
2046 |
|
|
2047 |
|
my $el = $doc-><M::XDPDocument.createXDPPI> ('pitarget'); |
2048 |
|
|
2049 |
|
$test->id ('interface'); |
2050 |
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2051 |
|
|
2052 |
|
$test->id ('namespaceURI'); |
2053 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2054 |
|
|
2055 |
|
$test->id ('localName'); |
2056 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2057 |
|
|
2058 |
|
$test->id ('dtdText'); |
2059 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2060 |
|
'<?pitarget?>'); |
2061 |
|
|
2062 |
|
$test->id ('length'); |
2063 |
|
$test->assert_num_equals |
2064 |
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2065 |
|
expected_value => 1); |
2066 |
|
@@Test: |
2067 |
|
@@@QName: XDPDocument.createXDPPI.3.test |
2068 |
|
@@@PerlDef: |
2069 |
|
my $doc; |
2070 |
|
__CODE{createXDPDocumentForTest}__; |
2071 |
|
|
2072 |
|
my $el = $doc-><M::XDPDocument.createXDPPI> (null, 'pidata'); |
2073 |
|
|
2074 |
|
$test->id ('interface'); |
2075 |
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2076 |
|
|
2077 |
|
$test->id ('namespaceURI'); |
2078 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2079 |
|
|
2080 |
|
$test->id ('localName'); |
2081 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2082 |
|
|
2083 |
|
$test->id ('dtdText'); |
2084 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2085 |
|
'<? pidata?>'); |
2086 |
|
|
2087 |
|
$test->id ('length'); |
2088 |
|
$test->assert_num_equals |
2089 |
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2090 |
|
expected_value => 3); |
2091 |
|
@@Test: |
2092 |
|
@@@QName: XDPDocument.createXDPPI.4.test |
2093 |
|
@@@PerlDef: |
2094 |
|
my $doc; |
2095 |
|
__CODE{createXDPDocumentForTest}__; |
2096 |
|
|
2097 |
|
my $el = $doc-><M::XDPDocument.createXDPPI>; |
2098 |
|
|
2099 |
|
$test->id ('interface'); |
2100 |
|
$test->assert_isa ($el, <IFName::XDPPIElement>); |
2101 |
|
|
2102 |
|
$test->id ('namespaceURI'); |
2103 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2104 |
|
|
2105 |
|
$test->id ('localName'); |
2106 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'pi'); |
2107 |
|
|
2108 |
|
$test->id ('dtdText'); |
2109 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<??>'); |
2110 |
|
|
2111 |
|
$test->id ('length'); |
2112 |
|
$test->assert_num_equals |
2113 |
|
(actual_value => 0+@{$el-><AG::Node.childNodes>}, |
2114 |
|
expected_value => 1); |
2115 |
|
|
2116 |
|
@Method: |
2117 |
|
@@Name: createXDPComment |
2118 |
|
@@enDesc: |
2119 |
|
Creates a <XE::xdp|comment> element. |
2120 |
|
@@Param: |
2121 |
|
@@@Name: value |
2122 |
|
@@@Type: DOMString |
2123 |
|
@@@enDesc: |
2124 |
|
The value of the element, i.e. the content of the comment. |
2125 |
|
@@@nullCase: |
2126 |
|
@@@@enDesc: |
2127 |
|
Same as an empty string. |
2128 |
|
@@Return: |
2129 |
|
@@@Type: XDPCommentElement |
2130 |
|
@@@enDesc: |
2131 |
|
The newly created element node. |
2132 |
|
|
2133 |
|
{P:: A new <IF::Element> node with following attributes |
2134 |
|
<kwd:MUST> be returned: |
2135 |
|
|
2136 |
|
- <A::Node.localName>::: <XE::comment>. |
2137 |
|
|
2138 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2139 |
|
|
2140 |
|
- <A::Node.ownerDocument>::: The document. |
2141 |
|
|
2142 |
|
- <A::Node.textContent>::: <P::value>, or an empty |
2143 |
|
string if <P::value> is <DOM::null>. |
2144 |
|
|
2145 |
|
} |
2146 |
|
|
2147 |
|
If a <IF::Text> node is created, its |
2148 |
|
<A::Text.isElementContentWhitespace> attribute value |
2149 |
|
<kwd:MUST> be set to <DOM::false>. |
2150 |
|
@@@PerlDef: |
2151 |
|
__DEEP{ |
2152 |
|
$r = $self-><M::Document.createElementNS> |
2153 |
|
(<Q::xdp|>, 'comment'); |
2154 |
|
$r-><AS::Node.textContent> (defined $value ? $value : ''); |
2155 |
|
}__; |
2156 |
|
|
2157 |
|
@@Test: |
2158 |
|
@@@QName: XDPDocument.createXDPComment.1.test |
2159 |
|
@@@PerlDef: |
2160 |
|
my $doc; |
2161 |
|
__CODE{createXDPDocumentForTest}__; |
2162 |
|
|
2163 |
|
my $value = q<pename>; |
2164 |
|
my $el = $doc-><M::XDPDocument.createXDPComment> ($value); |
2165 |
|
|
2166 |
|
$test->id ('interface'); |
2167 |
|
$test->assert_isa ($el, <IFName::XDPCommentElement>); |
2168 |
|
|
2169 |
|
$test->id ('namespaceURI'); |
2170 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2171 |
|
|
2172 |
|
$test->id ('localName'); |
2173 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'comment'); |
2174 |
|
|
2175 |
|
$test->id ('textContent'); |
2176 |
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
2177 |
|
|
2178 |
|
$test->id ('dtdText'); |
2179 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2180 |
|
'<!--'.$value.'-->'); |
2181 |
|
@@Test: |
2182 |
|
@@@QName: XDPDocument.createXDPComment.2.test |
2183 |
|
@@@PerlDef: |
2184 |
|
my $doc; |
2185 |
|
__CODE{createXDPDocumentForTest}__; |
2186 |
|
|
2187 |
|
my $el = $doc-><M::XDPDocument.createXDPComment> (null); |
2188 |
|
|
2189 |
|
$test->id ('interface'); |
2190 |
|
$test->assert_isa ($el, <IFName::XDPCommentElement>); |
2191 |
|
|
2192 |
|
$test->id ('namespaceURI'); |
2193 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2194 |
|
|
2195 |
|
$test->id ('localName'); |
2196 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'comment'); |
2197 |
|
|
2198 |
|
$test->id ('textContent'); |
2199 |
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
2200 |
|
|
2201 |
|
$test->id ('dtdText'); |
2202 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!---->'); |
2203 |
|
|
2204 |
|
@Method: |
2205 |
|
@@Name: createXDPMarkedSectionStatus |
2206 |
|
@@enDesc: |
2207 |
|
Creates a <XE::xdp|marked-section-status> element. |
2208 |
|
@@Param: |
2209 |
|
@@@Name: value |
2210 |
|
@@@Type: DOMString |
2211 |
|
@@@enDesc: |
2212 |
|
The value of the element. |
2213 |
|
@@@nullCase: |
2214 |
|
@@@@enDesc: |
2215 |
|
Same as an empty string. |
2216 |
|
@@Return: |
2217 |
|
@@@Type: XDPMarkedSectionStatusElement |
2218 |
|
@@@enDesc: |
2219 |
|
The newly created element node. |
2220 |
|
|
2221 |
|
{P:: A new <IF::Element> node with following attributes |
2222 |
|
<kwd:MUST> be returned: |
2223 |
|
|
2224 |
|
- <A::Node.localName>::: <XE::marked-section-status>. |
2225 |
|
|
2226 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2227 |
|
|
2228 |
|
- <A::Node.ownerDocument>::: The document. |
2229 |
|
|
2230 |
|
} |
2231 |
|
|
2232 |
|
{P:: If <P::value> is not <DOM::null> and its length |
2233 |
|
is greater than zero, the returned node <kwd:MUST> |
2234 |
|
contain a <IF::Element> with following attributes: |
2235 |
|
|
2236 |
|
- <A::Node.localName>::: <XE::keyword>. |
2237 |
|
|
2238 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2239 |
|
|
2240 |
|
- <A::Node.ownerDocument>::: The document. |
2241 |
|
|
2242 |
|
- <A::Node.textContent>::: <P::value>. |
2243 |
|
|
2244 |
|
} |
2245 |
|
|
2246 |
|
If a <IF::Text> node is created, its |
2247 |
|
<A::Text.isElementContentWhitespace> attribute value |
2248 |
|
<kwd:MUST> be set to <DOM::false>. |
2249 |
|
@@@PerlDef: |
2250 |
|
__DEEP{ |
2251 |
|
$r = $self-><M::Document.createElementNS> |
2252 |
|
(<Q::xdp|>, 'marked-section-status'); |
2253 |
|
if (defined $value and length $value) { |
2254 |
|
$r-><M::Node.appendChild> |
2255 |
|
($self-><M::XDPDocument.createXDPKeyword> ($value)); |
2256 |
|
} |
2257 |
|
}__; |
2258 |
|
|
2259 |
|
@@Test: |
2260 |
|
@@@QName: XDPDocument.createXDPMarkedSectionStatus.1.test |
2261 |
|
@@@PerlDef: |
2262 |
|
my $doc; |
2263 |
|
__CODE{createXDPDocumentForTest}__; |
2264 |
|
|
2265 |
|
my $value = q<INCLUDE>; |
2266 |
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSectionStatus> ($value); |
2267 |
|
|
2268 |
|
$test->id ('interface'); |
2269 |
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionStatusElement>); |
2270 |
|
|
2271 |
|
$test->id ('namespaceURI'); |
2272 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2273 |
|
|
2274 |
|
$test->id ('localName'); |
2275 |
|
$test->assert_equals ($el-><AG::Node.localName>, |
2276 |
|
'marked-section-status'); |
2277 |
|
|
2278 |
|
$test->id ('textContent'); |
2279 |
|
$test->assert_equals ($el-><AG::Node.textContent>, $value); |
2280 |
|
|
2281 |
|
$test->id ('dtdText'); |
2282 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, $value.'['); |
2283 |
|
@@Test: |
2284 |
|
@@@QName: XDPDocument.createXDPMarkedSectionStatus.2.test |
2285 |
|
@@@PerlDef: |
2286 |
|
my $doc; |
2287 |
|
__CODE{createXDPDocumentForTest}__; |
2288 |
|
|
2289 |
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSectionStatus> (null); |
2290 |
|
|
2291 |
|
$test->id ('interface'); |
2292 |
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionStatusElement>); |
2293 |
|
|
2294 |
|
$test->id ('namespaceURI'); |
2295 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2296 |
|
|
2297 |
|
$test->id ('localName'); |
2298 |
|
$test->assert_equals ($el-><AG::Node.localName>, |
2299 |
|
'marked-section-status'); |
2300 |
|
|
2301 |
|
$test->id ('textContent'); |
2302 |
|
$test->assert_equals ($el-><AG::Node.textContent>, ''); |
2303 |
|
|
2304 |
|
$test->id ('dtdText'); |
2305 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '['); |
2306 |
|
|
2307 |
|
@Method: |
2308 |
|
@@Name: createXDPMarkedSection |
2309 |
|
@@enDesc: |
2310 |
|
Creates a <XE::xdp|marked-section> element. |
2311 |
|
@@Param: |
2312 |
|
@@@Name: status |
2313 |
|
@@@Type: DOMString |
2314 |
|
@@@enDesc: |
2315 |
|
The status value of the marked section. |
2316 |
|
@@@nullCase: |
2317 |
|
@@@@enDesc: |
2318 |
|
Same as an empty string. |
2319 |
|
@@Param: |
2320 |
|
@@@Name: value |
2321 |
|
@@@Type: DOMString |
2322 |
|
@@@enDesc: |
2323 |
|
The value of the marked section. |
2324 |
|
@@@nullCase: |
2325 |
|
@@@@enDesc: |
2326 |
|
Same as an empty string. |
2327 |
|
@@Return: |
2328 |
|
@@@Type: XDPMarkedSectionElement |
2329 |
|
@@@enDesc: |
2330 |
|
The newly created element node. |
2331 |
|
|
2332 |
|
{P:: A new <IF::Element> node with following attributes |
2333 |
|
<kwd:MUST> be returned: |
2334 |
|
|
2335 |
|
- <A::Node.localName>::: <XE::marked-section>. |
2336 |
|
|
2337 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2338 |
|
|
2339 |
|
- <A::Node.ownerDocument>::: The document. |
2340 |
|
|
2341 |
|
} |
2342 |
|
|
2343 |
|
The returned <IF::Element> node <kwd:MUST> contain |
2344 |
|
a child node that would be returned when the |
2345 |
|
<M::XDPDocument.createXDPMarkedSectionStatus> method |
2346 |
|
on the document is invoked with <P::status> as a parameter. |
2347 |
|
|
2348 |
|
{P:: If <P::value> is not <DOM::null> and the length of |
2349 |
|
<P::value> is greater than zero, the |
2350 |
|
<XE::xdp|marked-section-status> <IF::Element> node |
2351 |
|
<kwd:MUST> have a <A::Node.nextSibling> <IF::Node> |
2352 |
|
with following attributes: |
2353 |
|
|
2354 |
|
- <A::Node.nodeType>::: <C::Node.TEXT_NODE>. |
2355 |
|
|
2356 |
|
- <A::Node.ownerDocument>::: The document. |
2357 |
|
|
2358 |
|
- <A::Node.textContent>::: <P::content>, or an empty |
2359 |
|
string if <P::content> is <DOM::null>. |
2360 |
|
|
2361 |
|
} |
2362 |
|
|
2363 |
|
If a <IF::Text> node is created, its |
2364 |
|
<A::Text.isElementContentWhitespace> attribute value |
2365 |
|
<kwd:MUST> be set to <DOM::false>. |
2366 |
|
@@@PerlDef: |
2367 |
|
__DEEP{ |
2368 |
|
$r = $self-><M::Document.createElementNS> |
2369 |
|
(<Q::xdp|>, 'marked-section'); |
2370 |
|
my $mss_el = $self-><M::XDPDocument.createXDPMarkedSectionStatus> |
2371 |
|
($status); |
2372 |
|
$r-><M::Node.appendChild> ($mss_el); |
2373 |
|
$r-><M::Node.manakaiAppendText> ($value) |
2374 |
|
if defined $value and length $value; |
2375 |
|
}__; |
2376 |
|
|
2377 |
|
@@Test: |
2378 |
|
@@@QName: XDPDocument.createXDPMarkedSection.1.test |
2379 |
|
@@@PerlDef: |
2380 |
|
my $doc; |
2381 |
|
__CODE{createXDPDocumentForTest}__; |
2382 |
|
|
2383 |
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection> ('IGNORE', 'a'); |
2384 |
|
|
2385 |
|
$test->id ('interface'); |
2386 |
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2387 |
|
|
2388 |
|
$test->id ('namespaceURI'); |
2389 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2390 |
|
|
2391 |
|
$test->id ('localName'); |
2392 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2393 |
|
|
2394 |
|
$test->id ('dtdText'); |
2395 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![IGNORE[a]]>'); |
2396 |
|
@@Test: |
2397 |
|
@@@QName: XDPDocument.createXDPMarkedSection.2.test |
2398 |
|
@@@PerlDef: |
2399 |
|
my $doc; |
2400 |
|
__CODE{createXDPDocumentForTest}__; |
2401 |
|
|
2402 |
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection> ('IGNORE'); |
2403 |
|
|
2404 |
|
$test->id ('interface'); |
2405 |
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2406 |
|
|
2407 |
|
$test->id ('namespaceURI'); |
2408 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2409 |
|
|
2410 |
|
$test->id ('localName'); |
2411 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2412 |
|
|
2413 |
|
$test->id ('dtdText'); |
2414 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![IGNORE[]]>'); |
2415 |
|
@@Test: |
2416 |
|
@@@QName: XDPDocument.createXDPMarkedSection.3.test |
2417 |
|
@@@PerlDef: |
2418 |
|
my $doc; |
2419 |
|
__CODE{createXDPDocumentForTest}__; |
2420 |
|
|
2421 |
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection> (null, 'a'); |
2422 |
|
|
2423 |
|
$test->id ('interface'); |
2424 |
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2425 |
|
|
2426 |
|
$test->id ('namespaceURI'); |
2427 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2428 |
|
|
2429 |
|
$test->id ('localName'); |
2430 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2431 |
|
|
2432 |
|
$test->id ('dtdText'); |
2433 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![[a]]>'); |
2434 |
|
@@Test: |
2435 |
|
@@@QName: XDPDocument.createXDPMarkedSection.4.test |
2436 |
|
@@@PerlDef: |
2437 |
|
my $doc; |
2438 |
|
__CODE{createXDPDocumentForTest}__; |
2439 |
|
|
2440 |
|
my $el = $doc-><M::XDPDocument.createXDPMarkedSection>; |
2441 |
|
|
2442 |
|
$test->id ('interface'); |
2443 |
|
$test->assert_isa ($el, <IFName::XDPMarkedSectionElement>); |
2444 |
|
|
2445 |
|
$test->id ('namespaceURI'); |
2446 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2447 |
|
|
2448 |
|
$test->id ('localName'); |
2449 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'marked-section'); |
2450 |
|
|
2451 |
|
$test->id ('dtdText'); |
2452 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<![[]]>'); |
2453 |
|
|
2454 |
|
@Method: |
2455 |
|
@@Name: createXDPNotation |
2456 |
|
@@enDesc: |
2457 |
|
Creates a <XE::xdp|notation> element. |
2458 |
|
@@Param: |
2459 |
|
@@@Name: name |
2460 |
|
@@@Type: DOMString |
2461 |
|
@@@enDesc: |
2462 |
|
The name of the declaration. |
2463 |
|
@@@nullCase: |
2464 |
|
@@@@enDesc: |
2465 |
|
All parameters are ignored. |
2466 |
|
@@Param: |
2467 |
|
@@@Name: publicId |
2468 |
|
@@@Type: DOMString |
2469 |
|
@@@enDesc: |
2470 |
|
The public identifier in the declaration. |
2471 |
|
@@@nullCase: |
2472 |
|
@@@@enDesc: |
2473 |
|
No public identifier. |
2474 |
|
@@Param: |
2475 |
|
@@@Name: systemId |
2476 |
|
@@@Type: DOMString |
2477 |
|
@@@enDesc: |
2478 |
|
The system identifier in the declaration. |
2479 |
|
@@@nullCase: |
2480 |
|
@@@@enDesc: |
2481 |
|
No system identifier. |
2482 |
|
@@Return: |
2483 |
|
@@@Type: XDPNotationElement |
2484 |
|
@@@enDesc: |
2485 |
|
The newly created element node. |
2486 |
|
|
2487 |
|
{P:: A new <IF::Element> node with following attributes |
2488 |
|
<kwd:MUST> be returned: |
2489 |
|
|
2490 |
|
- <A::Node.localName>::: <XE::notation>. |
2491 |
|
|
2492 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2493 |
|
|
2494 |
|
- <A::Node.ownerDocument>::: The document. |
2495 |
|
|
2496 |
|
} |
2497 |
|
|
2498 |
|
{P:: A series of nodes <kwd:MUST> be associated to the returned |
2499 |
|
node as if the following algorithm were applied: |
2500 |
|
|
2501 |
|
= If <P::name> is <DOM::null>, stop the algorithm. |
2502 |
|
|
2503 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2504 |
|
a <CHAR::SPACE> as a parameter and append the |
2505 |
|
node to the returned element by the <M::Node.appendChild> method. |
2506 |
|
|
2507 |
|
= Create a node by <M::XDPDocument.createXDPName> on the document |
2508 |
|
with <P::name> as a parameter and append the |
2509 |
|
node to the returned element by the <M::Node.appendChild> method. |
2510 |
|
|
2511 |
|
{OLI:: If <P::publicId> is different from <DOM::null>, |
2512 |
|
|
2513 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2514 |
|
a <CHAR::SPACE> as a parameter and append the |
2515 |
|
node to the returned element by the <M::Node.appendChild> method. |
2516 |
|
|
2517 |
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2518 |
|
on the document with a string <XML::PUBLIC> as |
2519 |
|
a parameter and append the |
2520 |
|
node to the returned element by the <M::Node.appendChild> method. |
2521 |
|
|
2522 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2523 |
|
a <CHAR::SPACE> as a parameter and append the |
2524 |
|
node to the returned element by the <M::Node.appendChild> method. |
2525 |
|
|
2526 |
|
= Create a node by <M::XDPDocument.createXDPMinimumLiteral> |
2527 |
|
on the document with <P::publicId> as a parameter |
2528 |
|
and append the node to the returned element by |
2529 |
|
the <M::Node.appendChild> method. |
2530 |
|
|
2531 |
|
} |
2532 |
|
|
2533 |
|
{OLI:: If <P::systemId> is different from <DOM::null> and |
2534 |
|
<P::publicId> is <DOM::null>, |
2535 |
|
|
2536 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2537 |
|
a <CHAR::SPACE> as a parameter and append the |
2538 |
|
node to the returned element by the <M::Node.appendChild> method. |
2539 |
|
|
2540 |
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2541 |
|
on the document with a string <XML::SYSTEM> as |
2542 |
|
a parameter and append the |
2543 |
|
node to the returned element by the <M::Node.appendChild> method. |
2544 |
|
|
2545 |
|
} |
2546 |
|
|
2547 |
|
{OLI:: If <P::systemId> is different from <DOM::null> and |
2548 |
|
<P::publicId> is <DOM::null>, |
2549 |
|
|
2550 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2551 |
|
a <CHAR::SPACE> as a parameter and append the |
2552 |
|
node to the returned element by the <M::Node.appendChild> method. |
2553 |
|
|
2554 |
|
= Create a node by <M::XDPDocument.createXDPSystemLiteral> |
2555 |
|
on the document with <P::systemId> as a parameter |
2556 |
|
and append the node to the returned element by |
2557 |
|
the <M::Node.appendChild> method. |
2558 |
|
|
2559 |
|
} |
2560 |
|
|
2561 |
|
} |
2562 |
|
@@@PerlDef: |
2563 |
|
__DEEP{ |
2564 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'notation'); |
2565 |
|
if (defined $name) { |
2566 |
|
$r-><M::Node.appendChild> |
2567 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2568 |
|
$r-><M::Node.appendChild> |
2569 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
2570 |
|
|
2571 |
|
if (defined $publicId) { |
2572 |
|
$r-><M::Node.appendChild> |
2573 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2574 |
|
$r-><M::Node.appendChild> |
2575 |
|
($self-><M::XDPDocument.createXDPKeyword> ('PUBLIC')); |
2576 |
|
$r-><M::Node.appendChild> |
2577 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2578 |
|
$r-><M::Node.appendChild> |
2579 |
|
($self-><M::XDPDocument.createXDPMinimumLiteral> |
2580 |
|
($publicId)); |
2581 |
|
if (defined $systemId) { |
2582 |
|
$r-><M::Node.appendChild> |
2583 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2584 |
|
$r-><M::Node.appendChild> |
2585 |
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2586 |
|
($systemId)); |
2587 |
|
} |
2588 |
|
} elsif (defined $systemId) { |
2589 |
|
$r-><M::Node.appendChild> |
2590 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2591 |
|
$r-><M::Node.appendChild> |
2592 |
|
($self-><M::XDPDocument.createXDPKeyword> ('SYSTEM')); |
2593 |
|
$r-><M::Node.appendChild> |
2594 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2595 |
|
$r-><M::Node.appendChild> |
2596 |
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2597 |
|
($systemId)); |
2598 |
|
} |
2599 |
|
} |
2600 |
|
}__; |
2601 |
|
|
2602 |
|
@@Test: |
2603 |
|
@@@QName: XDPDocument.createXDPNotation.1.test |
2604 |
|
@@@PerlDef: |
2605 |
|
my $doc; |
2606 |
|
__CODE{createXDPDocumentForTest}__; |
2607 |
|
|
2608 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2609 |
|
('iname', 'pubid', 'sysid'); |
2610 |
|
|
2611 |
|
$test->id ('interface'); |
2612 |
|
$test->assert_isa ($el, <IFName::XDPNotationElement>); |
2613 |
|
|
2614 |
|
$test->id ('namespaceURI'); |
2615 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2616 |
|
|
2617 |
|
$test->id ('localName'); |
2618 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'notation'); |
2619 |
|
|
2620 |
|
$test->id ('dtdText'); |
2621 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2622 |
|
'<!NOTATION iname PUBLIC "pubid" "sysid">'); |
2623 |
|
@@Test: |
2624 |
|
@@@QName: XDPDocument.createXDPNotation.2.test |
2625 |
|
@@@PerlDef: |
2626 |
|
my $doc; |
2627 |
|
__CODE{createXDPDocumentForTest}__; |
2628 |
|
|
2629 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2630 |
|
('iname', 'pubid'); |
2631 |
|
|
2632 |
|
$test->id ('dtdText'); |
2633 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2634 |
|
'<!NOTATION iname PUBLIC "pubid">'); |
2635 |
|
@@Test: |
2636 |
|
@@@QName: XDPDocument.createXDPNotation.3.test |
2637 |
|
@@@PerlDef: |
2638 |
|
my $doc; |
2639 |
|
__CODE{createXDPDocumentForTest}__; |
2640 |
|
|
2641 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2642 |
|
('iname'); |
2643 |
|
|
2644 |
|
$test->id ('dtdText'); |
2645 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2646 |
|
'<!NOTATION iname>'); |
2647 |
|
@@Test: |
2648 |
|
@@@QName: XDPDocument.createXDPNotation.4.test |
2649 |
|
@@@PerlDef: |
2650 |
|
my $doc; |
2651 |
|
__CODE{createXDPDocumentForTest}__; |
2652 |
|
|
2653 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation>; |
2654 |
|
|
2655 |
|
$test->id ('dtdText'); |
2656 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2657 |
|
'<!NOTATION>'); |
2658 |
|
@@Test: |
2659 |
|
@@@QName: XDPDocument.createXDPNotation.5.test |
2660 |
|
@@@PerlDef: |
2661 |
|
my $doc; |
2662 |
|
__CODE{createXDPDocumentForTest}__; |
2663 |
|
|
2664 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2665 |
|
('iname', null, 'sysid'); |
2666 |
|
|
2667 |
|
$test->id ('dtdText'); |
2668 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2669 |
|
'<!NOTATION iname SYSTEM "sysid">'); |
2670 |
|
@@Test: |
2671 |
|
@@@QName: XDPDocument.createXDPNotation.6.test |
2672 |
|
@@@PerlDef: |
2673 |
|
my $doc; |
2674 |
|
__CODE{createXDPDocumentForTest}__; |
2675 |
|
|
2676 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2677 |
|
(null, null, 'sysid'); |
2678 |
|
|
2679 |
|
$test->id ('dtdText'); |
2680 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2681 |
|
'<!NOTATION>'); |
2682 |
|
@@Test: |
2683 |
|
@@@QName: XDPDocument.createXDPNotation.7.test |
2684 |
|
@@@PerlDef: |
2685 |
|
my $doc; |
2686 |
|
__CODE{createXDPDocumentForTest}__; |
2687 |
|
|
2688 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2689 |
|
(null, 'pubid'); |
2690 |
|
|
2691 |
|
$test->id ('dtdText'); |
2692 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2693 |
|
'<!NOTATION>'); |
2694 |
|
@@Test: |
2695 |
|
@@@QName: XDPDocument.createXDPNotation.8.test |
2696 |
|
@@@PerlDef: |
2697 |
|
my $doc; |
2698 |
|
__CODE{createXDPDocumentForTest}__; |
2699 |
|
|
2700 |
|
my $el = $doc-><M::XDPDocument.createXDPNotation> |
2701 |
|
(null, 'pubid', 'sysid'); |
2702 |
|
|
2703 |
|
$test->id ('dtdText'); |
2704 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
2705 |
|
'<!NOTATION>'); |
2706 |
|
|
2707 |
|
@Method: |
2708 |
|
@@Name: createXDPEntity |
2709 |
|
@@enDesc: |
2710 |
|
Creates a <XE::xdp|entity> element. |
2711 |
|
@@Param: |
2712 |
|
@@@Name: isPE |
2713 |
|
@@@Type: boolean |
2714 |
|
@@@enDesc: |
2715 |
|
Whether the declaration declares a parameter entity or not. |
2716 |
|
@@@TrueCase: |
2717 |
|
@@@@enDesc: |
2718 |
|
The declaration declares a parameter entity. A <XML::%> |
2719 |
|
delimiter will be appended to the return node. |
2720 |
|
@@@FalseCase: |
2721 |
|
@@@@enDesc: |
2722 |
|
The declaration is not known to declare a parameter entity. |
2723 |
|
@@Param: |
2724 |
|
@@@Name: name |
2725 |
|
@@@Type: DOMString |
2726 |
|
@@@enDesc: |
2727 |
|
The name of the declaration. |
2728 |
|
@@@nullCase: |
2729 |
|
@@@@enDesc: |
2730 |
|
All parameters are ignored. |
2731 |
|
@@Param: |
2732 |
|
@@@Name: value |
2733 |
|
@@@Type: DOMString |
2734 |
|
@@@enDesc: |
2735 |
|
The literal replacement text of the declaration. |
2736 |
|
@@@nullCase: |
2737 |
|
@@@@enDesc: |
2738 |
|
Same as an empty string or no entity value in the declaration, |
2739 |
|
depending on whether the <P::publicId> parameters are <DOM::null> |
2740 |
|
or not. |
2741 |
|
@@Param: |
2742 |
|
@@@Name: publicId |
2743 |
|
@@@Type: DOMString |
2744 |
|
@@@enDesc: |
2745 |
|
The public identifier in the declaration. |
2746 |
|
@@@nullCase: |
2747 |
|
@@@@enDesc: |
2748 |
|
No public identifier. |
2749 |
|
@@Param: |
2750 |
|
@@@Name: systemId |
2751 |
|
@@@Type: DOMString |
2752 |
|
@@@enDesc: |
2753 |
|
The system identifier in the declaration. |
2754 |
|
@@@nullCase: |
2755 |
|
@@@@enDesc: |
2756 |
|
No system identifier. |
2757 |
|
@@Param: |
2758 |
|
@@@Name: notation |
2759 |
|
@@@Type: DOMString |
2760 |
|
@@@enDesc: |
2761 |
|
The notation name in the declaration. |
2762 |
|
@@@nullCase: |
2763 |
|
@@@@enDesc: |
2764 |
|
No notation name. |
2765 |
|
@@Return: |
2766 |
|
@@@Type: XDPEntityElement |
2767 |
|
@@@enDesc: |
2768 |
|
The newly created element node. |
2769 |
|
|
2770 |
|
{P:: A new <IF::Element> node with following attributes |
2771 |
|
<kwd:MUST> be returned: |
2772 |
|
|
2773 |
|
- <A::Node.localName>::: <XE::entity>. |
2774 |
|
|
2775 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
2776 |
|
|
2777 |
|
- <A::Node.ownerDocument>::: The document. |
2778 |
|
|
2779 |
|
} |
2780 |
|
|
2781 |
|
{P:: A series of nodes <kwd:MUST> be associated to the returned |
2782 |
|
node as if the following algorithm were applied: |
2783 |
|
|
2784 |
|
{OLI:: If <P::isPE> is <DOM::true>, |
2785 |
|
|
2786 |
|
= Create a node by <M::XDPDocument.createXDPS> on the |
2787 |
|
document with a <CHAR::SPACE> as a parameter and append the |
2788 |
|
node to the returned element by the <M::Node.appendChild> |
2789 |
|
method. |
2790 |
|
|
2791 |
|
= Create a node by <M::XDPDocument.createXDPDelimiter> |
2792 |
|
on the document with a <CHAR::PERCENT SIGN> as a parameter |
2793 |
|
and append the node to the returned element by the |
2794 |
|
<M::Node.appendChild> method. |
2795 |
|
|
2796 |
|
} |
2797 |
|
|
2798 |
|
= If <P::name> is <DOM::null>, stop the algorithm. |
2799 |
|
|
2800 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2801 |
|
a <CHAR::SPACE> as a parameter and append the |
2802 |
|
node to the returned element by the <M::Node.appendChild> method. |
2803 |
|
|
2804 |
|
= Create a node by <M::XDPDocument.createXDPName> on the document |
2805 |
|
with <P::name> as a parameter and append the |
2806 |
|
node to the returned element by the <M::Node.appendChild> method. |
2807 |
|
|
2808 |
|
{OLI:: If <P::systemId> is different from <DOM::null>, |
2809 |
|
|
2810 |
|
{OLI:: If <P::publicId> is different from <DOM::null>, |
2811 |
|
|
2812 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2813 |
|
with a <CHAR::SPACE> as a parameter and append the |
2814 |
|
node to the returned element by the <M::Node.appendChild> |
2815 |
|
method. |
2816 |
|
|
2817 |
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2818 |
|
on the document with a string <XML::PUBLIC> as |
2819 |
|
a parameter and append the |
2820 |
|
node to the returned element by the <M::Node.appendChild> |
2821 |
|
method. |
2822 |
|
|
2823 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2824 |
|
with a <CHAR::SPACE> as a parameter and append the |
2825 |
|
node to the returned element by the <M::Node.appendChild> |
2826 |
|
method. |
2827 |
|
|
2828 |
|
= Create a node by <M::XDPDocument.createXDPMinimumLiteral> |
2829 |
|
on the document with <P::publicId> as a parameter |
2830 |
|
and append the node to the returned element by |
2831 |
|
the <M::Node.appendChild> method. |
2832 |
|
|
2833 |
|
} |
2834 |
|
|
2835 |
|
{OLI:: Otherwise, |
2836 |
|
|
2837 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2838 |
|
with a <CHAR::SPACE> as a parameter and append the |
2839 |
|
node to the returned element by the <M::Node.appendChild> |
2840 |
|
method. |
2841 |
|
|
2842 |
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2843 |
|
on the document with a string <XML::SYSTEM> as |
2844 |
|
a parameter and append the |
2845 |
|
node to the returned element by the <M::Node.appendChild> |
2846 |
|
method. |
2847 |
|
|
2848 |
|
} |
2849 |
|
|
2850 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2851 |
|
a <CHAR::SPACE> as a parameter and append the |
2852 |
|
node to the returned element by the <M::Node.appendChild> method. |
2853 |
|
|
2854 |
|
= Create a node by <M::XDPDocument.createXDPSystemLiteral> |
2855 |
|
on the document with <P::systemId> as a parameter |
2856 |
|
and append the node to the returned element by |
2857 |
|
the <M::Node.appendChild> method. |
2858 |
|
|
2859 |
|
{OLI:: If <P::notation> is different from <DOM::null> |
2860 |
|
and <P::isPE> is <DOM::false>, |
2861 |
|
|
2862 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2863 |
|
with a <CHAR::SPACE> as a parameter and append the |
2864 |
|
node to the returned element by the <M::Node.appendChild> |
2865 |
|
method. |
2866 |
|
|
2867 |
|
= Create a node by <M::XDPDocument.createXDPKeyword> |
2868 |
|
on the document with a string <XML::NDATA> as |
2869 |
|
a parameter and append the |
2870 |
|
node to the returned element by the <M::Node.appendChild> |
2871 |
|
method. |
2872 |
|
|
2873 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document |
2874 |
|
with a <CHAR::SPACE> as a parameter and append the |
2875 |
|
node to the returned element by the <M::Node.appendChild> |
2876 |
|
method. |
2877 |
|
|
2878 |
|
= Create a node by <M::XDPDocument.createXDPName> |
2879 |
|
on the document with <P::notation> as a parameter |
2880 |
|
and append the node to the returned element by |
2881 |
|
the <M::Node.appendChild> method. |
2882 |
|
|
2883 |
|
} |
2884 |
|
|
2885 |
|
} |
2886 |
|
|
2887 |
|
{OLI:: Otherwise, |
2888 |
|
|
2889 |
|
= Create a node by <M::XDPDocument.createXDPS> on the document with |
2890 |
|
a <CHAR::SPACE> as a parameter and append the |
2891 |
|
node to the returned element by the <M::Node.appendChild> method. |
2892 |
|
|
2893 |
|
= Create a node by <M::XDPDocument.createXDPEntityValue> |
2894 |
|
on the document with <P::value> as a parameter |
2895 |
|
and append the node to the returned element by |
2896 |
|
the <M::Node.appendChild> method. |
2897 |
|
|
2898 |
|
} |
2899 |
|
|
2900 |
|
} |
2901 |
|
@@@PerlDef: |
2902 |
|
__DEEP{ |
2903 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'entity'); |
2904 |
|
if ($isPE) { |
2905 |
|
$r-><M::Node.appendChild> |
2906 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2907 |
|
$r-><M::Node.appendChild> |
2908 |
|
($self-><M::XDPDocument.createXDPDelimiter> ('%')); |
2909 |
|
} |
2910 |
|
if (defined $name) { |
2911 |
|
$r-><M::Node.appendChild> |
2912 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2913 |
|
$r-><M::Node.appendChild> |
2914 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
2915 |
|
|
2916 |
|
if (defined $systemId) { |
2917 |
|
if (defined $publicId) { |
2918 |
|
$r-><M::Node.appendChild> |
2919 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2920 |
|
$r-><M::Node.appendChild> |
2921 |
|
($self-><M::XDPDocument.createXDPKeyword> ('PUBLIC')); |
2922 |
|
$r-><M::Node.appendChild> |
2923 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2924 |
|
$r-><M::Node.appendChild> |
2925 |
|
($self-><M::XDPDocument.createXDPMinimumLiteral> |
2926 |
|
($publicId)); |
2927 |
|
$r-><M::Node.appendChild> |
2928 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2929 |
|
$r-><M::Node.appendChild> |
2930 |
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2931 |
|
($systemId)); |
2932 |
|
} else { |
2933 |
|
$r-><M::Node.appendChild> |
2934 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2935 |
|
$r-><M::Node.appendChild> |
2936 |
|
($self-><M::XDPDocument.createXDPKeyword> ('SYSTEM')); |
2937 |
|
$r-><M::Node.appendChild> |
2938 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2939 |
|
$r-><M::Node.appendChild> |
2940 |
|
($self-><M::XDPDocument.createXDPSystemLiteral> |
2941 |
|
($systemId)); |
2942 |
|
} |
2943 |
|
|
2944 |
|
if (defined $notation and not $isPE) { |
2945 |
|
$r-><M::Node.appendChild> |
2946 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2947 |
|
$r-><M::Node.appendChild> |
2948 |
|
($self-><M::XDPDocument.createXDPKeyword> ('NDATA')); |
2949 |
|
$r-><M::Node.appendChild> |
2950 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2951 |
|
$r-><M::Node.appendChild> |
2952 |
|
($self-><M::XDPDocument.createXDPName> ($notation)); |
2953 |
|
} |
2954 |
|
} else { |
2955 |
|
$r-><M::Node.appendChild> |
2956 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
2957 |
|
$r-><M::Node.appendChild> |
2958 |
|
($self-><M::XDPDocument.createXDPEntityValue> ($value)); |
2959 |
|
} |
2960 |
|
} |
2961 |
|
}__; |
2962 |
|
|
2963 |
|
@@Test: |
2964 |
|
@@@QName: XDPDocument.createXDPEntity.1.test |
2965 |
|
@@@PerlDef: |
2966 |
|
my $doc; |
2967 |
|
__CODE{createXDPDocumentForTest}__; |
2968 |
|
|
2969 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
2970 |
|
(true, 'iname', 'evalue', 'pubid', 'sysid', 'nname'); |
2971 |
|
|
2972 |
|
$test->id ('interface'); |
2973 |
|
$test->assert_isa ($el, <IFName::XDPEntityElement>); |
2974 |
|
|
2975 |
|
$test->id ('namespaceURI'); |
2976 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
2977 |
|
|
2978 |
|
$test->id ('localName'); |
2979 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'entity'); |
2980 |
|
|
2981 |
|
$test->id ('dtdText'); |
2982 |
|
$test->assert_equals |
2983 |
|
($el-><AG::XDPElement.dtdText>, |
2984 |
|
'<!ENTITY % iname PUBLIC "pubid" "sysid">'); |
2985 |
|
@@Test: |
2986 |
|
@@@QName: XDPDocument.createXDPEntity.2.test |
2987 |
|
@@@PerlDef: |
2988 |
|
my $doc; |
2989 |
|
__CODE{createXDPDocumentForTest}__; |
2990 |
|
|
2991 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
2992 |
|
(false, 'iname', 'evalue', 'pubid', 'sysid', 'nname'); |
2993 |
|
|
2994 |
|
$test->id ('dtdText'); |
2995 |
|
$test->assert_equals |
2996 |
|
($el-><AG::XDPElement.dtdText>, |
2997 |
|
'<!ENTITY iname PUBLIC "pubid" "sysid" NDATA nname>'); |
2998 |
|
@@Test: |
2999 |
|
@@@QName: XDPDocument.createXDPEntity.3.test |
3000 |
|
@@@PerlDef: |
3001 |
|
my $doc; |
3002 |
|
__CODE{createXDPDocumentForTest}__; |
3003 |
|
|
3004 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3005 |
|
(false, 'iname', 'evalue', 'pubid', 'sysid'); |
3006 |
|
|
3007 |
|
$test->id ('dtdText'); |
3008 |
|
$test->assert_equals |
3009 |
|
($el-><AG::XDPElement.dtdText>, |
3010 |
|
'<!ENTITY iname PUBLIC "pubid" "sysid">'); |
3011 |
|
@@Test: |
3012 |
|
@@@QName: XDPDocument.createXDPEntity.4.test |
3013 |
|
@@@PerlDef: |
3014 |
|
my $doc; |
3015 |
|
__CODE{createXDPDocumentForTest}__; |
3016 |
|
|
3017 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3018 |
|
(true, 'iname', 'evalue', 'pubid', 'sysid'); |
3019 |
|
|
3020 |
|
$test->id ('dtdText'); |
3021 |
|
$test->assert_equals |
3022 |
|
($el-><AG::XDPElement.dtdText>, |
3023 |
|
'<!ENTITY % iname PUBLIC "pubid" "sysid">'); |
3024 |
|
@@Test: |
3025 |
|
@@@QName: XDPDocument.createXDPEntity.5.test |
3026 |
|
@@@PerlDef: |
3027 |
|
my $doc; |
3028 |
|
__CODE{createXDPDocumentForTest}__; |
3029 |
|
|
3030 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3031 |
|
(false, 'iname', 'evalue', null, 'sysid'); |
3032 |
|
|
3033 |
|
$test->id ('dtdText'); |
3034 |
|
$test->assert_equals |
3035 |
|
($el-><AG::XDPElement.dtdText>, |
3036 |
|
'<!ENTITY iname SYSTEM "sysid">'); |
3037 |
|
@@Test: |
3038 |
|
@@@QName: XDPDocument.createXDPEntity.6.test |
3039 |
|
@@@PerlDef: |
3040 |
|
my $doc; |
3041 |
|
__CODE{createXDPDocumentForTest}__; |
3042 |
|
|
3043 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3044 |
|
(true, 'iname', 'evalue', null, 'sysid'); |
3045 |
|
|
3046 |
|
$test->id ('dtdText'); |
3047 |
|
$test->assert_equals |
3048 |
|
($el-><AG::XDPElement.dtdText>, |
3049 |
|
'<!ENTITY % iname SYSTEM "sysid">'); |
3050 |
|
@@Test: |
3051 |
|
@@@QName: XDPDocument.createXDPEntity.7.test |
3052 |
|
@@@PerlDef: |
3053 |
|
my $doc; |
3054 |
|
__CODE{createXDPDocumentForTest}__; |
3055 |
|
|
3056 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3057 |
|
(false, 'iname', 'evalue'); |
3058 |
|
|
3059 |
|
$test->id ('dtdText'); |
3060 |
|
$test->assert_equals |
3061 |
|
($el-><AG::XDPElement.dtdText>, |
3062 |
|
'<!ENTITY iname "evalue">'); |
3063 |
|
@@Test: |
3064 |
|
@@@QName: XDPDocument.createXDPEntity.8.test |
3065 |
|
@@@PerlDef: |
3066 |
|
my $doc; |
3067 |
|
__CODE{createXDPDocumentForTest}__; |
3068 |
|
|
3069 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3070 |
|
(true, 'iname', 'evalue'); |
3071 |
|
|
3072 |
|
$test->id ('dtdText'); |
3073 |
|
$test->assert_equals |
3074 |
|
($el-><AG::XDPElement.dtdText>, |
3075 |
|
'<!ENTITY % iname "evalue">'); |
3076 |
|
@@Test: |
3077 |
|
@@@QName: XDPDocument.createXDPEntity.9.test |
3078 |
|
@@@PerlDef: |
3079 |
|
my $doc; |
3080 |
|
__CODE{createXDPDocumentForTest}__; |
3081 |
|
|
3082 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3083 |
|
(false, 'iname'); |
3084 |
|
|
3085 |
|
$test->id ('dtdText'); |
3086 |
|
$test->assert_equals |
3087 |
|
($el-><AG::XDPElement.dtdText>, |
3088 |
|
'<!ENTITY iname "">'); |
3089 |
|
@@Test: |
3090 |
|
@@@QName: XDPDocument.createXDPEntity.10.test |
3091 |
|
@@@PerlDef: |
3092 |
|
my $doc; |
3093 |
|
__CODE{createXDPDocumentForTest}__; |
3094 |
|
|
3095 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3096 |
|
(false); |
3097 |
|
|
3098 |
|
$test->id ('dtdText'); |
3099 |
|
$test->assert_equals |
3100 |
|
($el-><AG::XDPElement.dtdText>, |
3101 |
|
'<!ENTITY>'); |
3102 |
|
@@Test: |
3103 |
|
@@@QName: XDPDocument.createXDPEntity.11.test |
3104 |
|
@@@PerlDef: |
3105 |
|
my $doc; |
3106 |
|
__CODE{createXDPDocumentForTest}__; |
3107 |
|
|
3108 |
|
my $el = $doc-><M::XDPDocument.createXDPEntity> |
3109 |
|
(true); |
3110 |
|
|
3111 |
|
$test->id ('dtdText'); |
3112 |
|
$test->assert_equals |
3113 |
|
($el-><AG::XDPElement.dtdText>, |
3114 |
|
'<!ENTITY %>'); |
3115 |
|
|
3116 |
|
@Method: |
3117 |
|
@@Name: createXDPEnumGroup |
3118 |
|
@@enDesc: |
3119 |
|
Creates a <XE::xdp|enum-group> element. |
3120 |
|
@@Return: |
3121 |
|
@@@Type: XDPEnumGroupElement |
3122 |
|
@@@enDesc: |
3123 |
|
The newly created element node. |
3124 |
|
|
3125 |
|
{P:: A new <IF::Element> node with following attributes |
3126 |
|
<kwd:MUST> be returned: |
3127 |
|
|
3128 |
|
- <A::Node.localName>::: <XE::enum-group>. |
3129 |
|
|
3130 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3131 |
|
|
3132 |
|
- <A::Node.ownerDocument>::: The document. |
3133 |
|
|
3134 |
|
} |
3135 |
|
@@@PerlDef: |
3136 |
|
__DEEP{ |
3137 |
|
$r = $self-><M::Document.createElementNS> |
3138 |
|
(<Q::xdp|>, 'enum-group'); |
3139 |
|
}__; |
3140 |
|
|
3141 |
|
@@Test: |
3142 |
|
@@@QName: XDPDocument.createXDPEnumGroup.1.test |
3143 |
|
@@@PerlDef: |
3144 |
|
my $doc; |
3145 |
|
__CODE{createXDPDocumentForTest}__; |
3146 |
|
|
3147 |
|
my $el = $doc-><M::XDPDocument.createXDPEnumGroup>; |
3148 |
|
|
3149 |
|
$test->id ('interface'); |
3150 |
|
$test->assert_isa ($el, <IFName::XDPEnumGroupElement>); |
3151 |
|
|
3152 |
|
$test->id ('namespaceURI'); |
3153 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3154 |
|
|
3155 |
|
$test->id ('localName'); |
3156 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'enum-group'); |
3157 |
|
|
3158 |
|
$test->id ('dtdText'); |
3159 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
3160 |
|
|
3161 |
|
@Method: |
3162 |
|
@@Name: createXDPModelGroup |
3163 |
|
@@enDesc: |
3164 |
|
Creates a <XE::xdp|model-group> element. |
3165 |
|
@@Return: |
3166 |
|
@@@Type: XDPModelGroupElement |
3167 |
|
@@@enDesc: |
3168 |
|
The newly created element node. |
3169 |
|
|
3170 |
|
{P:: A new <IF::Element> node with following attributes |
3171 |
|
<kwd:MUST> be returned: |
3172 |
|
|
3173 |
|
- <A::Node.localName>::: <XE::model-group>. |
3174 |
|
|
3175 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3176 |
|
|
3177 |
|
- <A::Node.ownerDocument>::: The document. |
3178 |
|
|
3179 |
|
} |
3180 |
|
@@@PerlDef: |
3181 |
|
__DEEP{ |
3182 |
|
$r = $self-><M::Document.createElementNS> |
3183 |
|
(<Q::xdp|>, 'model-group'); |
3184 |
|
}__; |
3185 |
|
|
3186 |
|
@@Test: |
3187 |
|
@@@QName: XDPDocument.createXDPModelGroup.1.test |
3188 |
|
@@@PerlDef: |
3189 |
|
my $doc; |
3190 |
|
__CODE{createXDPDocumentForTest}__; |
3191 |
|
|
3192 |
|
my $el = $doc-><M::XDPDocument.createXDPModelGroup>; |
3193 |
|
|
3194 |
|
$test->id ('interface'); |
3195 |
|
$test->assert_isa ($el, <IFName::XDPModelGroupElement>); |
3196 |
|
|
3197 |
|
$test->id ('namespaceURI'); |
3198 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3199 |
|
|
3200 |
|
$test->id ('localName'); |
3201 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'model-group'); |
3202 |
|
|
3203 |
|
$test->id ('dtdText'); |
3204 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '()'); |
3205 |
|
|
3206 |
|
@Method: |
3207 |
|
@@Name: createXDPAttrDefinition |
3208 |
|
@@enDesc: |
3209 |
|
Creates a <XE::xdp|attr-definition> element. |
3210 |
|
|
3211 |
|
{ISSUE:: |
3212 |
|
Declared type and default type parameters should be added? |
3213 |
|
} |
3214 |
|
@@Param: |
3215 |
|
@@@Name: name |
3216 |
|
@@@Type: DOMString |
3217 |
|
@@@enDesc: |
3218 |
|
The name of the attribute. |
3219 |
|
@@@nullCase: |
3220 |
|
@@@@enDesc: |
3221 |
|
All parameters are ignored. |
3222 |
|
@@Return: |
3223 |
|
@@@Type: XDPElement |
3224 |
|
@@@enDesc: |
3225 |
|
The newly created element node. |
3226 |
|
|
3227 |
|
{P:: A new <IF::Element> node with following attributes |
3228 |
|
<kwd:MUST> be returned: |
3229 |
|
|
3230 |
|
- <A::Node.localName>::: <XE::attr-definition>. |
3231 |
|
|
3232 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3233 |
|
|
3234 |
|
- <A::Node.ownerDocument>::: The document. |
3235 |
|
|
3236 |
|
} |
3237 |
|
|
3238 |
|
{P:: If <P::name> is different from <DOM::null>, a |
3239 |
|
<IF::Element> node with following attributes |
3240 |
|
<kwd:MUST> be appended to the returned node |
3241 |
|
as if the <M::Node.appendChild> method were invoked. |
3242 |
|
|
3243 |
|
- <A::Node.localName>::: <XE::name>. |
3244 |
|
|
3245 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3246 |
|
|
3247 |
|
- <A::Node.ownerDocument>::: The document. |
3248 |
|
|
3249 |
|
- <A::Node.textContent>::: <P::name>. |
3250 |
|
|
3251 |
|
} |
3252 |
|
@@@PerlDef: |
3253 |
|
__DEEP{ |
3254 |
|
$r = $self-><M::Document.createElementNS> |
3255 |
|
(<Q::xdp|>, 'attr-definition'); |
3256 |
|
$r-><M::Node.appendChild> |
3257 |
|
($self-><M::XDPDocument.createXDPName> ($name)) |
3258 |
|
if defined $name; |
3259 |
|
}__; |
3260 |
|
|
3261 |
|
@@Test: |
3262 |
|
@@@QName: XDPDocument.createXDPAttrDefinition.1.test |
3263 |
|
@@@PerlDef: |
3264 |
|
my $doc; |
3265 |
|
__CODE{createXDPDocumentForTest}__; |
3266 |
|
|
3267 |
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition> ('aname'); |
3268 |
|
|
3269 |
|
$test->id ('interface'); |
3270 |
|
$test->assert_isa ($el, <IFName::XDPElement>); |
3271 |
|
|
3272 |
|
$test->id ('namespaceURI'); |
3273 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3274 |
|
|
3275 |
|
$test->id ('localName'); |
3276 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attr-definition'); |
3277 |
|
|
3278 |
|
$test->id ('dtdText'); |
3279 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, 'aname'); |
3280 |
|
@@Test: |
3281 |
|
@@@QName: XDPDocument.createXDPAttrDefinition.2.test |
3282 |
|
@@@PerlDef: |
3283 |
|
my $doc; |
3284 |
|
__CODE{createXDPDocumentForTest}__; |
3285 |
|
|
3286 |
|
my $el = $doc-><M::XDPDocument.createXDPAttrDefinition>; |
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>, ''); |
3299 |
|
|
3300 |
|
@Method: |
3301 |
|
@@Name: createXDPAttlist |
3302 |
|
@@enDesc: |
3303 |
|
Creates a <XE::xdp|attlist> element. |
3304 |
|
@@Param: |
3305 |
|
@@@Name: name |
3306 |
|
@@@Type: DOMString |
3307 |
|
@@@enDesc: |
3308 |
|
The name in the declaration. |
3309 |
|
@@@nullCase: |
3310 |
|
@@@@enDesc: |
3311 |
|
The declaration does not contain any name. |
3312 |
|
@@Return: |
3313 |
|
@@@Type: XDPAttlistElement |
3314 |
|
@@@enDesc: |
3315 |
|
The newly created element node. |
3316 |
|
|
3317 |
|
{P:: A new <IF::Element> node with following attributes |
3318 |
|
<kwd:MUST> be returned: |
3319 |
|
|
3320 |
|
- <A::Node.localName>::: <XE::attlist>. |
3321 |
|
|
3322 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3323 |
|
|
3324 |
|
- <A::Node.ownerDocument>::: The document. |
3325 |
|
|
3326 |
|
} |
3327 |
|
|
3328 |
|
{P:: If <P::name> is different from <DOM::null>, two |
3329 |
|
<IF::Element> nodes with following attributes |
3330 |
|
<kwd:MUST> be appended to the returned node |
3331 |
|
as if the <M::Node.appendChild> method were invoked in order. |
3332 |
|
|
3333 |
|
{LI:: |
3334 |
|
|
3335 |
|
- <A::Node.localName>::: <XE::s>. |
3336 |
|
|
3337 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3338 |
|
|
3339 |
|
- <A::Node.ownerDocument>::: The document. |
3340 |
|
|
3341 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3342 |
|
|
3343 |
|
} |
3344 |
|
|
3345 |
|
{LI:: |
3346 |
|
|
3347 |
|
- <A::Node.localName>::: <XE::name>. |
3348 |
|
|
3349 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3350 |
|
|
3351 |
|
- <A::Node.ownerDocument>::: The document. |
3352 |
|
|
3353 |
|
- <A::Node.textContent>::: <P::name>. |
3354 |
|
|
3355 |
|
} |
3356 |
|
|
3357 |
|
} |
3358 |
|
@@@PerlDef: |
3359 |
|
__DEEP{ |
3360 |
|
$r = $self-><M::Document.createElementNS> |
3361 |
|
(<Q::xdp|>, 'attlist'); |
3362 |
|
if (defined $name) { |
3363 |
|
$r-><M::Node.appendChild> |
3364 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3365 |
|
$r-><M::Node.appendChild> |
3366 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3367 |
|
} |
3368 |
|
}__; |
3369 |
|
|
3370 |
|
@@Test: |
3371 |
|
@@@QName: XDPDocument.createXDPAttlist.1.test |
3372 |
|
@@@PerlDef: |
3373 |
|
my $doc; |
3374 |
|
__CODE{createXDPDocumentForTest}__; |
3375 |
|
|
3376 |
|
my $el = $doc-><M::XDPDocument.createXDPAttlist> ('aname'); |
3377 |
|
|
3378 |
|
$test->id ('interface'); |
3379 |
|
$test->assert_isa ($el, <IFName::XDPAttlistElement>); |
3380 |
|
|
3381 |
|
$test->id ('namespaceURI'); |
3382 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3383 |
|
|
3384 |
|
$test->id ('localName'); |
3385 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'attlist'); |
3386 |
|
|
3387 |
|
$test->id ('dtdText'); |
3388 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ATTLIST aname>'); |
3389 |
|
@@Test: |
3390 |
|
@@@QName: XDPDocument.createXDPAttlist.2.test |
3391 |
|
@@@PerlDef: |
3392 |
|
my $doc; |
3393 |
|
__CODE{createXDPDocumentForTest}__; |
3394 |
|
|
3395 |
|
my $el = $doc-><M::XDPDocument.createXDPAttlist>; |
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>'); |
3408 |
|
|
3409 |
|
@Method: |
3410 |
|
@@Name: createXDPElement |
3411 |
|
@@enDesc: |
3412 |
|
Creates a <XE::xdp|element> element. |
3413 |
|
|
3414 |
|
{ISSUE:: |
3415 |
|
Should declared content parameter be added? |
3416 |
|
} |
3417 |
|
@@Param: |
3418 |
|
@@@Name: name |
3419 |
|
@@@Type: DOMString |
3420 |
|
@@@enDesc: |
3421 |
|
The name in the declaration. |
3422 |
|
@@@nullCase: |
3423 |
|
@@@@enDesc: |
3424 |
|
The declaration does not contain any name. |
3425 |
|
@@Return: |
3426 |
|
@@@Type: XDPElementElement |
3427 |
|
@@@enDesc: |
3428 |
|
The newly created element node. |
3429 |
|
|
3430 |
|
{P:: A new <IF::Element> node with following attributes |
3431 |
|
<kwd:MUST> be returned: |
3432 |
|
|
3433 |
|
- <A::Node.localName>::: <XE::element>. |
3434 |
|
|
3435 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3436 |
|
|
3437 |
|
- <A::Node.ownerDocument>::: The document. |
3438 |
|
|
3439 |
|
} |
3440 |
|
|
3441 |
|
{P:: If <P::name> is different from <DOM::null>, two |
3442 |
|
<IF::Element> nodes with following attributes |
3443 |
|
<kwd:MUST> be appended to the returned node |
3444 |
|
as if the <M::Node.appendChild> method were invoked in order. |
3445 |
|
|
3446 |
|
{LI:: |
3447 |
|
|
3448 |
|
- <A::Node.localName>::: <XE::s>. |
3449 |
|
|
3450 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3451 |
|
|
3452 |
|
- <A::Node.ownerDocument>::: The document. |
3453 |
|
|
3454 |
|
- <A::Node.textContent>::: A <CHAR::SPACE>. |
3455 |
|
|
3456 |
|
} |
3457 |
|
|
3458 |
|
{LI:: |
3459 |
|
|
3460 |
|
- <A::Node.localName>::: <XE::name>. |
3461 |
|
|
3462 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3463 |
|
|
3464 |
|
- <A::Node.ownerDocument>::: The document. |
3465 |
|
|
3466 |
|
- <A::Node.textContent>::: <P::name>. |
3467 |
|
|
3468 |
|
} |
3469 |
|
|
3470 |
|
} |
3471 |
|
@@@PerlDef: |
3472 |
|
__DEEP{ |
3473 |
|
$r = $self-><M::Document.createElementNS> |
3474 |
|
(<Q::xdp|>, 'element'); |
3475 |
|
if (defined $name) { |
3476 |
|
$r-><M::Node.appendChild> |
3477 |
|
($self-><M::XDPDocument.createXDPS> (' ')); |
3478 |
|
$r-><M::Node.appendChild> |
3479 |
|
($self-><M::XDPDocument.createXDPName> ($name)); |
3480 |
|
} |
3481 |
|
}__; |
3482 |
|
|
3483 |
|
@@Test: |
3484 |
|
@@@QName: XDPDocument.createXDPElement.1.test |
3485 |
|
@@@PerlDef: |
3486 |
|
my $doc; |
3487 |
|
__CODE{createXDPDocumentForTest}__; |
3488 |
|
|
3489 |
|
my $el = $doc-><M::XDPDocument.createXDPElement> ('aname'); |
3490 |
|
|
3491 |
|
$test->id ('interface'); |
3492 |
|
$test->assert_isa ($el, <IFName::XDPElementElement>); |
3493 |
|
|
3494 |
|
$test->id ('namespaceURI'); |
3495 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3496 |
|
|
3497 |
|
$test->id ('localName'); |
3498 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'element'); |
3499 |
|
|
3500 |
|
$test->id ('dtdText'); |
3501 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, '<!ELEMENT aname>'); |
3502 |
|
@@Test: |
3503 |
|
@@@QName: XDPDocument.createXDPElement.2.test |
3504 |
|
@@@PerlDef: |
3505 |
|
my $doc; |
3506 |
|
__CODE{createXDPDocumentForTest}__; |
3507 |
|
|
3508 |
|
my $el = $doc-><M::XDPDocument.createXDPElement>; |
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>'); |
3521 |
|
|
3522 |
|
@Method: |
3523 |
|
@@Name: createXDPIf |
3524 |
|
@@enDesc: |
3525 |
|
Creates an <XE::xdp|if> element. |
3526 |
|
@@Param: |
3527 |
|
@@@Name: statusEntity |
3528 |
|
@@@Type: DOMString |
3529 |
|
@@@enDesc: |
3530 |
|
The name of the parameter entity that contains |
3531 |
|
the status of the marked section. |
3532 |
|
@@@nullCase: |
3533 |
|
@@@@enDesc: |
3534 |
|
Same as an empty string. |
3535 |
|
@@Return: |
3536 |
|
@@@Type: XDPIfElement |
3537 |
|
@@@enDesc: |
3538 |
|
The newly created element node. |
3539 |
|
|
3540 |
|
{P:: A new <IF::Element> node with following attributes |
3541 |
|
<kwd:MUST> be returned: |
3542 |
|
|
3543 |
|
- <A::Node.localName>::: <XE::if>. |
3544 |
|
|
3545 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3546 |
|
|
3547 |
|
- <A::Node.ownerDocument>::: The document. |
3548 |
|
|
3549 |
|
} |
3550 |
|
|
3551 |
|
{P:: The <A::Node.attributes> <IF::tc|NamedNodeMap> |
3552 |
|
of the returned <IF:Element> node <kwd:MUST> contain |
3553 |
|
a new <IF::te|Attr> node with following attributes: |
3554 |
|
|
3555 |
|
- <A::Node.localName>::: <XA::status-entity>. |
3556 |
|
|
3557 |
|
- <A::Node.namespaceURI>::: <DOM::null>. |
3558 |
|
|
3559 |
|
- <A::te|Attr.specified>::: <DOM::true>. |
3560 |
|
|
3561 |
|
- <A::Node.textContent>::: <P::statusEntity>, or an empty |
3562 |
|
string if <P::statusEntity> |
3563 |
|
is <DOM::null>. |
3564 |
|
|
3565 |
|
} |
3566 |
|
|
3567 |
|
{P:: <A::Node.childNodes> <IF::tc|NodeList> of |
3568 |
|
the returned <IF::Element> node <kwd:MUST> contain |
3569 |
|
two <IF::Element> nodes in order: |
3570 |
|
|
3571 |
|
{LI:: |
3572 |
|
|
3573 |
|
- <A::Node.localName>::: <XE::true>. |
3574 |
|
|
3575 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3576 |
|
|
3577 |
|
- <A::Node.ownerDocument>::: The document. |
3578 |
|
|
3579 |
|
- <A::Node.textContent>::: An empty string. |
3580 |
|
|
3581 |
|
} |
3582 |
|
|
3583 |
|
{LI:: |
3584 |
|
|
3585 |
|
- <A::Node.localName>::: <XE::false>. |
3586 |
|
|
3587 |
|
- <A::Node.namespaceURI>::: <URI^^DISCore|QName::xdp|>. |
3588 |
|
|
3589 |
|
- <A::Node.ownerDocument>::: The document. |
3590 |
|
|
3591 |
|
- <A::Node.textContent>::: An empty string. |
3592 |
|
|
3593 |
|
} |
3594 |
|
|
3595 |
|
} |
3596 |
|
@@@PerlDef: |
3597 |
|
__DEEP{ |
3598 |
|
$r = $self-><M::Document.createElementNS> (<Q::xdp|>, 'if'); |
3599 |
|
$r-><M::Element.setAttributeNS> |
3600 |
|
(null, 'status-entity', |
3601 |
|
defined $statusEntity ? $statusEntity : ''); |
3602 |
|
$r-><M::Node.appendChild> |
3603 |
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'tr'.'ue')); |
3604 |
|
$r-><M::Node.appendChild> |
3605 |
|
($self-><M::Document.createElementNS> (<Q::xdp|>, 'fal'.'se')); |
3606 |
|
}__; |
3607 |
|
|
3608 |
|
@@Test: |
3609 |
|
@@@QName: XDPDocument.createXDPIf.1.test |
3610 |
|
@@@PerlDef: |
3611 |
|
my $doc; |
3612 |
|
__CODE{createXDPDocumentForTest}__; |
3613 |
|
|
3614 |
|
my $el = $doc-><M::XDPDocument.createXDPIf> ('aname'); |
3615 |
|
|
3616 |
|
$test->id ('interface'); |
3617 |
|
$test->assert_isa ($el, <IFName::XDPIfElement>); |
3618 |
|
|
3619 |
|
$test->id ('namespaceURI'); |
3620 |
|
$test->assert_equals ($el-><AG::Node.namespaceURI>, <Q::xdp|>); |
3621 |
|
|
3622 |
|
$test->id ('localName'); |
3623 |
|
$test->assert_equals ($el-><AG::Node.localName>, 'if'); |
3624 |
|
|
3625 |
|
$test->id ('dtdText'); |
3626 |
|
$test->assert_equals ($el-><AG::XDPElement.dtdText>, |
3627 |
|
"<![%aname;[\n<!-- end of aname -->]]>"); |
3628 |
|
|
3629 |
|
$test->id ('fc'); |
3630 |
|
my $fc = $el-><AG::Node.firstChild>; |
3631 |
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3632 |
|
|
3633 |
|
$test->id ('fc.namespaceURI'); |
3634 |
|
$test->assert_equals ($fc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3635 |
|
|
3636 |
|
$test->id ('fc.localName'); |
3637 |
|
$test->assert_equals ($fc-><AG::Node.localName>, 'tr'.'ue'); |
3638 |
|
|
3639 |
|
$test->id ('lc'); |
3640 |
|
my $lc = $el-><AG::Node.lastChild>; |
3641 |
|
$test->assert_isa ($fc, <IFName::XDPElement>); |
3642 |
|
|
3643 |
|
$test->id ('lc.namespaceURI'); |
3644 |
|
$test->assert_equals ($lc-><AG::Node.namespaceURI>, <Q::xdp|>); |
3645 |
|
|
3646 |
|
$test->id ('lc.localName'); |
3647 |
|
$test->assert_equals ($lc-><AG::Node.localName>, 'fal'.'se'); |
3648 |
##XDPDocument |
##XDPDocument |
3649 |
|
|
3650 |
IFClsDef: |
IFClsDef: |
3955 |
@@@PerlDef: |
@@@PerlDef: |
3956 |
$r = $self->SUPER::dtd_text; |
$r = $self->SUPER::dtd_text; |
3957 |
$r =~ s/\?>/?>/g; |
$r =~ s/\?>/?>/g; |
3958 |
$r = '<?'.$r.'?>'; |
$r = '<?xml'.$r.'?>'; |
3959 |
##XDPTextDeclElement |
##XDPTextDeclElement |
3960 |
|
|
3961 |
IFClsETDef: |
IFClsETDef: |
4115 |
C: while (defined $current) { |
C: while (defined $current) { |
4116 |
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4117 |
if ({ |
if ({ |
4118 |
|
<Q::xdp|attr-definition> => true, |
4119 |
<Q::xdp|peref> => true, |
<Q::xdp|peref> => true, |
4120 |
}->{$current->manakai_expanded_uri}) { |
}->{$current->manakai_expanded_uri}) { |
4121 |
$r .= $current-><AG::XDPElement.dtdText>; |
$r .= $current-><AG::XDPElement.dtdText>; |
4215 |
$r =~ s/"/"/g; |
$r =~ s/"/"/g; |
4216 |
$r = '"'.$r.'"'; |
$r = '"'.$r.'"'; |
4217 |
} |
} |
4218 |
##XDPPAttrLiteralElement |
##XDPAttrLiteralElement |
4219 |
|
|
4220 |
IFClsETDef: |
IFClsETDef: |
4221 |
@IFQName: XDPMinimumLiteralElement |
@IFQName: XDPMinimumLiteralElement |
4260 |
$r =~ s/"/%22/g; |
$r =~ s/"/%22/g; |
4261 |
$r = '"'.$r.'"'; |
$r = '"'.$r.'"'; |
4262 |
##XDPSystemLiteralElement |
##XDPSystemLiteralElement |
4263 |
|
|
4264 |
|
IFClsETDef: |
4265 |
|
@IFQName: XDPIfElement |
4266 |
|
@ETQName: xdp|if |
4267 |
|
@ClsQName: ManakaiDOMXDPIfElement |
4268 |
|
|
4269 |
|
@IFISA: XDPElement |
4270 |
|
@ClsISA: ManakaiDOMXDPElement |
4271 |
|
|
4272 |
|
@enDesc: |
4273 |
|
An <XE::xdp|if> element represents a set of XML DTD declarations |
4274 |
|
with a conditional section that can be enabled by a |
4275 |
|
parameter entity. |
4276 |
|
|
4277 |
|
@CAttr: |
4278 |
|
@@Name: dtdText |
4279 |
|
@@Type: DOMString |
4280 |
|
@@Get: |
4281 |
|
@@@PerlDef: |
4282 |
|
__DEEP{ |
4283 |
|
require Message::DOM::Traversal; |
4284 |
|
my $doctrv = $self-><AG::Node.ownerDocument> |
4285 |
|
-><M::Node.getFeature> (Traversal => '2.0'); |
4286 |
|
my $tw = $doctrv->create_tree_walker |
4287 |
|
($self, <C::NodeFilter.SHOW_ELEMENT> | |
4288 |
|
<C::NodeFilter.SHOW_TEXT> | |
4289 |
|
<C::NodeFilter.SHOW_CDATA_SECTION>, |
4290 |
|
sub { |
4291 |
|
my $node = $_[1]; |
4292 |
|
if ($node-><AG::Node.nodeType> |
4293 |
|
== <C::Node.ELEMENT_NODE>) { |
4294 |
|
my $ns = $node-><AG::Node.namespaceURI>; |
4295 |
|
if (not defined $ns) { |
4296 |
|
return <C::NodeFilter.FILTER_REJECT>; |
4297 |
|
} elsif ($ns eq <Q::xdp|>) { |
4298 |
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4299 |
|
} else { |
4300 |
|
return <C::NodeFilter.FILTER_REJECT>; |
4301 |
|
} |
4302 |
|
} else { |
4303 |
|
return <C::NodeFilter.FILTER_ACCEPT>; |
4304 |
|
} |
4305 |
|
}, true); |
4306 |
|
my $current = $tw->first_child; |
4307 |
|
|
4308 |
|
my $pename = $self-><M::Element.getAttributeNS> |
4309 |
|
(null, 'status-entity'); |
4310 |
|
$r = '<![%'.$pename.";[\n"; |
4311 |
|
|
4312 |
|
my $has_true; |
4313 |
|
C: while (defined $current) { |
4314 |
|
if ($current-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE>) { |
4315 |
|
if (not $has_true and |
4316 |
|
$current->manakai_expanded_uri eq <Q::xdp|true>) { |
4317 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4318 |
|
$r .= "<!-- end of $pename -->]]>"; |
4319 |
|
$has_true = true; |
4320 |
|
} elsif ($current->manakai_expanded_uri eq <Q::xdp|false>) { |
4321 |
|
my $v = $current-><AG::XDPElement.dtdText>; |
4322 |
|
$r .= "\n" if length $v; |
4323 |
|
$r .= $v; |
4324 |
|
} else { |
4325 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4326 |
|
} |
4327 |
|
} else { |
4328 |
|
$r .= $current-><AG::XDPElement.dtdText>; |
4329 |
|
} |
4330 |
|
|
4331 |
|
$current = $tw->next_sibling; |
4332 |
|
} # C |
4333 |
|
|
4334 |
|
$r .= "<!-- end of $pename -->]]>" unless $has_true; |
4335 |
|
}__; |
4336 |
|
##XDPIfElement |