* xmlBufDumpElementDecl: * @buf: an xmlBufPtr output * @elem: An element table * * This will dump the content of the element declaration as an XML * DTD definition */
| 567 | * DTD definition |
| 568 | */ |
| 569 | static void |
| 570 | xmlBufDumpElementDecl(xmlOutputBufferPtr buf, xmlElementPtr elem) { |
| 571 | xmlOutputBufferWrite(buf, 10, "<!ELEMENT "); |
| 572 | if (elem->prefix != NULL) { |
| 573 | xmlOutputBufferWriteString(buf, (const char *) elem->prefix); |
| 574 | xmlOutputBufferWrite(buf, 1, ":"); |
| 575 | } |
| 576 | xmlOutputBufferWriteString(buf, (const char *) elem->name); |
| 577 | xmlOutputBufferWrite(buf, 1, " "); |
| 578 | |
| 579 | switch (elem->etype) { |
| 580 | case XML_ELEMENT_TYPE_EMPTY: |
| 581 | xmlOutputBufferWrite(buf, 5, "EMPTY"); |
| 582 | break; |
| 583 | case XML_ELEMENT_TYPE_ANY: |
| 584 | xmlOutputBufferWrite(buf, 3, "ANY"); |
| 585 | break; |
| 586 | case XML_ELEMENT_TYPE_MIXED: |
| 587 | case XML_ELEMENT_TYPE_ELEMENT: |
| 588 | xmlBufDumpElementContent(buf, elem->content); |
| 589 | break; |
| 590 | default: |
| 591 | /* assert(0); */ |
| 592 | break; |
| 593 | } |
| 594 | |
| 595 | xmlOutputBufferWrite(buf, 2, ">\n"); |
| 596 | } |
| 597 | |
| 598 | /** |
| 599 | * xmlBufDumpEnumeration: |
no test coverage detected