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

Function htmlParseExternalID

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:3194–3233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3192 */
3193
3194static xmlChar *
3195htmlParseExternalID(htmlParserCtxtPtr ctxt, xmlChar **publicID) {
3196 xmlChar *URI = NULL;
3197
3198 if ((UPPER == 'S') && (UPP(1) == 'Y') &&
3199 (UPP(2) == 'S') && (UPP(3) == 'T') &&
3200 (UPP(4) == 'E') && (UPP(5) == 'M')) {
3201 SKIP(6);
3202 if (!IS_BLANK_CH(CUR)) {
3203 htmlParseErr(ctxt, XML_ERR_SPACE_REQUIRED,
3204 "Space required after 'SYSTEM'\n", NULL, NULL);
3205 }
3206 SKIP_BLANKS;
3207 URI = htmlParseSystemLiteral(ctxt);
3208 if (URI == NULL) {
3209 htmlParseErr(ctxt, XML_ERR_URI_REQUIRED,
3210 "htmlParseExternalID: SYSTEM, no URI\n", NULL, NULL);
3211 }
3212 } else if ((UPPER == 'P') && (UPP(1) == 'U') &&
3213 (UPP(2) == 'B') && (UPP(3) == 'L') &&
3214 (UPP(4) == 'I') && (UPP(5) == 'C')) {
3215 SKIP(6);
3216 if (!IS_BLANK_CH(CUR)) {
3217 htmlParseErr(ctxt, XML_ERR_SPACE_REQUIRED,
3218 "Space required after 'PUBLIC'\n", NULL, NULL);
3219 }
3220 SKIP_BLANKS;
3221 *publicID = htmlParsePubidLiteral(ctxt);
3222 if (*publicID == NULL) {
3223 htmlParseErr(ctxt, XML_ERR_PUBID_REQUIRED,
3224 "htmlParseExternalID: PUBLIC, no Public Identifier\n",
3225 NULL, NULL);
3226 }
3227 SKIP_BLANKS;
3228 if ((CUR == '"') || (CUR == '\'')) {
3229 URI = htmlParseSystemLiteral(ctxt);
3230 }
3231 }
3232 return(URI);
3233}
3234
3235/**
3236 * htmlParsePI:

Callers 1

htmlParseDocTypeDeclFunction · 0.85

Calls 2

htmlParseSystemLiteralFunction · 0.85
htmlParsePubidLiteralFunction · 0.85

Tested by

no test coverage detected