* xmlTextWriterWriteDTD: * @writer: the xmlTextWriterPtr * @name: the name of the DTD * @pubid: the public identifier, which is an alternative to the system identifier * @sysid: the system identifier, which is the URI of the DTD * @subset: string content of the DTD * * Write a DTD. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */
| 3104 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 3105 | */ |
| 3106 | int |
| 3107 | xmlTextWriterWriteDTD(xmlTextWriterPtr writer, |
| 3108 | const xmlChar * name, |
| 3109 | const xmlChar * pubid, |
| 3110 | const xmlChar * sysid, const xmlChar * subset) |
| 3111 | { |
| 3112 | int count; |
| 3113 | int sum; |
| 3114 | |
| 3115 | sum = 0; |
| 3116 | count = xmlTextWriterStartDTD(writer, name, pubid, sysid); |
| 3117 | if (count == -1) |
| 3118 | return -1; |
| 3119 | sum += count; |
| 3120 | if (subset != 0) { |
| 3121 | count = xmlTextWriterWriteString(writer, subset); |
| 3122 | if (count == -1) |
| 3123 | return -1; |
| 3124 | sum += count; |
| 3125 | } |
| 3126 | count = xmlTextWriterEndDTD(writer); |
| 3127 | if (count == -1) |
| 3128 | return -1; |
| 3129 | sum += count; |
| 3130 | |
| 3131 | return sum; |
| 3132 | } |
| 3133 | |
| 3134 | /** |
| 3135 | * xmlTextWriterStartDTDElement: |
no test coverage detected