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