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

Function xmlRelaxNGValidatePushCData

ThirdParty/libxml2/vtklibxml2/relaxng.c:8231–8255  ·  view source on GitHub ↗

* xmlRelaxNGValidatePushCData: * @ctxt: the RelaxNG validation context * @data: some character data read * @len: the length of the data * * check the CData parsed for validation in the current stack * * returns 1 if no validation problem was found or -1 otherwise */

Source from the content-addressed store, hash-verified

8229 * returns 1 if no validation problem was found or -1 otherwise
8230 */
8231int
8232xmlRelaxNGValidatePushCData(xmlRelaxNGValidCtxtPtr ctxt,
8233 const xmlChar * data, int len ATTRIBUTE_UNUSED)
8234{
8235 int ret = 1;
8236
8237 if ((ctxt == NULL) || (ctxt->elem == NULL) || (data == NULL))
8238 return (-1);
8239
8240 while (*data != 0) {
8241 if (!IS_BLANK_CH(*data))
8242 break;
8243 data++;
8244 }
8245 if (*data == 0)
8246 return (1);
8247
8248 ret = xmlRegExecPushString(ctxt->elem, BAD_CAST "#text", ctxt);
8249 if (ret < 0) {
8250 VALID_ERR2(XML_RELAXNG_ERR_TEXTWRONG, BAD_CAST " TODO ");
8251
8252 return (-1);
8253 }
8254 return (1);
8255}
8256
8257/**
8258 * xmlRelaxNGValidatePopElement:

Callers 1

Calls 1

xmlRegExecPushStringFunction · 0.85

Tested by

no test coverage detected