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

Function xmlParseAttributeType

ThirdParty/libxml2/vtklibxml2/parser.c:6205–6233  ·  view source on GitHub ↗

* xmlParseAttributeType: * @ctxt: an XML parser context * @tree: the enumeration tree built while parsing * * DEPRECATED: Internal function, don't use. * * parse the Attribute list def for an element * * [54] AttType ::= StringType | TokenizedType | EnumeratedType * * [55] StringType ::= 'CDATA' * * [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | *

Source from the content-addressed store, hash-verified

6203 * Returns the attribute type
6204 */
6205int
6206xmlParseAttributeType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) {
6207 if (CMP5(CUR_PTR, 'C', 'D', 'A', 'T', 'A')) {
6208 SKIP(5);
6209 return(XML_ATTRIBUTE_CDATA);
6210 } else if (CMP6(CUR_PTR, 'I', 'D', 'R', 'E', 'F', 'S')) {
6211 SKIP(6);
6212 return(XML_ATTRIBUTE_IDREFS);
6213 } else if (CMP5(CUR_PTR, 'I', 'D', 'R', 'E', 'F')) {
6214 SKIP(5);
6215 return(XML_ATTRIBUTE_IDREF);
6216 } else if ((RAW == 'I') && (NXT(1) == 'D')) {
6217 SKIP(2);
6218 return(XML_ATTRIBUTE_ID);
6219 } else if (CMP6(CUR_PTR, 'E', 'N', 'T', 'I', 'T', 'Y')) {
6220 SKIP(6);
6221 return(XML_ATTRIBUTE_ENTITY);
6222 } else if (CMP8(CUR_PTR, 'E', 'N', 'T', 'I', 'T', 'I', 'E', 'S')) {
6223 SKIP(8);
6224 return(XML_ATTRIBUTE_ENTITIES);
6225 } else if (CMP8(CUR_PTR, 'N', 'M', 'T', 'O', 'K', 'E', 'N', 'S')) {
6226 SKIP(8);
6227 return(XML_ATTRIBUTE_NMTOKENS);
6228 } else if (CMP7(CUR_PTR, 'N', 'M', 'T', 'O', 'K', 'E', 'N')) {
6229 SKIP(7);
6230 return(XML_ATTRIBUTE_NMTOKEN);
6231 }
6232 return(xmlParseEnumeratedType(ctxt, tree));
6233}
6234
6235/**
6236 * xmlParseAttributeListDecl:

Callers 1

Calls 1

xmlParseEnumeratedTypeFunction · 0.85

Tested by

no test coverage detected