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