summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlschemas.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmlschemas.c b/xmlschemas.c
index 4662ebbf..8e6fc40c 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -2143,8 +2143,14 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
(vctxt->parserCtxt != NULL) &&
(vctxt->parserCtxt->input != NULL)) {
file = vctxt->parserCtxt->input->filename;
- line = vctxt->parserCtxt->input->line;
- col = vctxt->parserCtxt->input->col;
+ if (vctxt->inode != NULL) {
+ line = vctxt->inode->nodeLine;
+ col = 0;
+ } else {
+ /* This is inaccurate. */
+ line = vctxt->parserCtxt->input->line;
+ col = vctxt->parserCtxt->input->col;
+ }
}
} else {
/*