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

Function xmlExpandEntitiesInAttValue

ThirdParty/libxml2/vtklibxml2/parser.c:4249–4267  ·  view source on GitHub ↗

* xmlExpandEntitiesInAttValue: * @ctxt: parser context * @str: entity or attribute value * @normalize: whether to collapse whitespace * * Expand general entity references in an entity or attribute value. * Perform attribute value normalization. * * Returns the expanded attribtue value. */

Source from the content-addressed store, hash-verified

4247 * Returns the expanded attribtue value.
4248 */
4249xmlChar *
4250xmlExpandEntitiesInAttValue(xmlParserCtxtPtr ctxt, const xmlChar *str,
4251 int normalize) {
4252 unsigned maxLength = (ctxt->options & XML_PARSE_HUGE) ?
4253 XML_MAX_HUGE_LENGTH :
4254 XML_MAX_TEXT_LENGTH;
4255 xmlSBuf buf;
4256 int inSpace = 1;
4257
4258 xmlSBufInit(&buf, maxLength);
4259
4260 xmlExpandEntityInAttValue(ctxt, &buf, str, NULL, normalize, &inSpace,
4261 ctxt->inputNr, /* check */ 0);
4262
4263 if ((normalize) && (inSpace) && (buf.size > 0))
4264 buf.size--;
4265
4266 return(xmlSBufFinish(&buf, NULL, ctxt, "AttValue length too long"));
4267}
4268
4269/**
4270 * xmlParseAttValueInternal:

Callers 4

SAX2.cFile · 0.85
xmlStringDecodeEntitiesFunction · 0.85

Calls 3

xmlSBufInitFunction · 0.85
xmlSBufFinishFunction · 0.85

Tested by

no test coverage detected