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

Function htmlParseAttValue

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:2830–2861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2828 */
2829
2830static xmlChar *
2831htmlParseAttValue(htmlParserCtxtPtr ctxt) {
2832 xmlChar *ret = NULL;
2833
2834 if (CUR == '"') {
2835 NEXT;
2836 ret = htmlParseHTMLAttribute(ctxt, '"');
2837 if (CUR != '"') {
2838 htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
2839 "AttValue: \" expected\n", NULL, NULL);
2840 } else
2841 NEXT;
2842 } else if (CUR == '\'') {
2843 NEXT;
2844 ret = htmlParseHTMLAttribute(ctxt, '\'');
2845 if (CUR != '\'') {
2846 htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
2847 "AttValue: ' expected\n", NULL, NULL);
2848 } else
2849 NEXT;
2850 } else {
2851 /*
2852 * That's an HTMLism, the attribute value may not be quoted
2853 */
2854 ret = htmlParseHTMLAttribute(ctxt, 0);
2855 if (ret == NULL) {
2856 htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
2857 "AttValue: no value found\n", NULL, NULL);
2858 }
2859 }
2860 return(ret);
2861}
2862
2863/**
2864 * htmlParseSystemLiteral:

Callers 1

htmlParseAttributeFunction · 0.85

Calls 1

htmlParseHTMLAttributeFunction · 0.85

Tested by

no test coverage detected