MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlTextWriterWriteDTD

Function xmlTextWriterWriteDTD

ThirdParty/libxml2/vtklibxml2/xmlwriter.c:3106–3132  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

3104 * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
3105 */
3106int
3107xmlTextWriterWriteDTD(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:

Callers 1

Calls 3

xmlTextWriterStartDTDFunction · 0.85
xmlTextWriterWriteStringFunction · 0.85
xmlTextWriterEndDTDFunction · 0.85

Tested by

no test coverage detected