* xmlTextWriterWriteDTDAttlist: * @writer: the xmlTextWriterPtr * @name: the name of the DTD ATTLIST * @content: content of the ATTLIST * * Write a DTD ATTLIST. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */
| 3577 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 3578 | */ |
| 3579 | int |
| 3580 | xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr writer, |
| 3581 | const xmlChar * name, const xmlChar * content) |
| 3582 | { |
| 3583 | int count; |
| 3584 | int sum; |
| 3585 | |
| 3586 | if (content == NULL) |
| 3587 | return -1; |
| 3588 | |
| 3589 | sum = 0; |
| 3590 | count = xmlTextWriterStartDTDAttlist(writer, name); |
| 3591 | if (count == -1) |
| 3592 | return -1; |
| 3593 | sum += count; |
| 3594 | |
| 3595 | count = xmlTextWriterWriteString(writer, content); |
| 3596 | if (count == -1) |
| 3597 | return -1; |
| 3598 | sum += count; |
| 3599 | |
| 3600 | count = xmlTextWriterEndDTDAttlist(writer); |
| 3601 | if (count == -1) |
| 3602 | return -1; |
| 3603 | sum += count; |
| 3604 | |
| 3605 | return sum; |
| 3606 | } |
| 3607 | |
| 3608 | /** |
| 3609 | * xmlTextWriterStartDTDEntity: |
no test coverage detected