aboutsummaryrefslogtreecommitdiffstats
path: root/SAX.c
diff options
context:
space:
mode:
Diffstat (limited to 'SAX.c')
-rw-r--r--SAX.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/SAX.c b/SAX.c
index 5aaf2f78..3ee76e71 100644
--- a/SAX.c
+++ b/SAX.c
@@ -1068,8 +1068,9 @@ my_attribute(void *ctx, const xmlChar *fullname, const xmlChar *value,
ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc,
ctxt->node, ret, value);
}
- } else if (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
- ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0))) {
+ } else if ((((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
+ ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0))) &&
+ (ctxt->depth == 0)) {
/*
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.