PREFIX(getAtts), \
PREFIX(charRefNumber), \
PREFIX(updatePosition), \
- PREFIX(isPublicId), \
- PREFIX(isSystemId)
+ PREFIX(isPublicId)
#define VTABLE2 \
PREFIX(encode), \
POSITION *);
int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
const char **badPtr);
- int (*isSystemId)(const ENCODING *enc, const char *ptr, const char *end,
- const char **badPtr);
int (*encode)(const ENCODING *enc,
int charNum,
char *buf);
#define XmlIsPublicId(enc, ptr, end, badPtr) \
(((enc)->isPublicId)(enc, ptr, end, badPtr))
-#define XmlIsSystemId(enc, ptr, end, badPtr) \
- (((enc)->isSystemId)(enc, ptr, end, badPtr))
-
#define XmlEncode(enc, ch, buf) \
(((enc)->encode)(enc, ch, buf))
return 1;
}
-static
-int PREFIX(isSystemId)(const ENCODING *enc, const char *ptr, const char *end,
- const char **badPtr)
-{
- ptr += MINBPC;
- end -= MINBPC;
- for (; ptr != end; ptr += MINBPC) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_DIGIT:
- case BT_HEX:
- case BT_MINUS:
- case BT_APOS:
- case BT_LPAR:
- case BT_RPAR:
- case BT_PLUS:
- case BT_COMMA:
- case BT_SOL:
- case BT_AMP:
- case BT_SEMI:
- case BT_EQUALS:
- case BT_QUEST:
- case BT_EXCL:
- case BT_AST:
- case BT_PERCNT:
- break;
- case BT_NAME:
- case BT_NMSTRT:
- if (BYTE_TO_ASCII(enc, ptr) & ~0x7f) {
- *badPtr = ptr;
- return 0;
- }
- break;
- default:
- switch (BYTE_TO_ASCII(enc, ptr)) {
- case '@':
- case '$':
- break;
- default:
- *badPtr = ptr;
- return 0;
- }
- break;
- }
- }
- return 1;
-}
-
/* This must only be called for a well-formed start-tag or empty element tag.
Returns the number of attributes. Pointers to the first attsMax attributes
are stored in atts. */
break;
}
case XML_ROLE_DOCTYPE_SYSTEM_ID:
- if (!XmlIsSystemId(*enc, s, next, nextPtr))
- return syntaxError;
dtd->containsRef = 1;
break;
- case XML_ROLE_NOTATION_SYSTEM_ID:
- if (!XmlIsSystemId(*enc, s, next, nextPtr))
- return syntaxError;
- break;
case XML_ROLE_DOCTYPE_PUBLIC_ID:
case XML_ROLE_ENTITY_PUBLIC_ID:
case XML_ROLE_NOTATION_PUBLIC_ID:
}
break;
case XML_ROLE_ENTITY_SYSTEM_ID:
- if (!XmlIsSystemId(*enc, s, next, nextPtr))
- return syntaxError;
if (entityNamePtr) {
const char *name = poolStoreString(&dtd->pool, *enc, entityNamePtr, entityNameEnd);
entity = (ENTITY *)lookup(&dtd->generalEntities, name, sizeof(ENTITY));