[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] attribute//ref in RelaxNG
- From: Daniel Veillard <veillard redhat com>
- To: Sebastian Rahtz <sebastian rahtz computing-services oxford ac uk>
- Cc: xml gnome org
- Subject: Re: [xml] attribute//ref in RelaxNG
- Date: Thu, 27 Feb 2003 16:26:42 -0500
On Thu, Feb 27, 2003 at 08:48:58PM +0000, Sebastian Rahtz wrote:
> Testing the 2.5.4 release of xmllint with my
> RelaxNG schemas, I get a lot of errors about
>
> Found forbidden pattern attribute//ref
[...]
> The RelaxNG validators by James Clark and Sun both
> say this is fine, and I cannot off-hand see anything in the
> Relax spec which would forbid it.
>
> Is this a bug in libxml2, or am I not reading the
1 bug and an unimplemented block. Both fixed in the enclosed patch,
thanks for the report,
Daniel
P.S.: I'm taking a long week-end out, so if I don't answer mail till
Monday, that's normal :-)
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Index: relaxng.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/relaxng.c,v
retrieving revision 1.40
diff -c -r1.40 relaxng.c
*** relaxng.c 27 Feb 2003 17:42:21 -0000 1.40
--- relaxng.c 27 Feb 2003 21:21:47 -0000
***************
*** 4370,4381 ****
"Found forbidden pattern list//ref\n");
ctxt->nbErrors++;
}
- if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
- if (ctxt->error != NULL)
- ctxt->error(ctxt->userData,
- "Found forbidden pattern attribute//ref\n");
- ctxt->nbErrors++;
- }
if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
if (ctxt->error != NULL)
ctxt->error(ctxt->userData,
--- 4370,4375 ----
***************
*** 4415,4420 ****
--- 4409,4420 ----
"Found forbidden pattern attribute//element(ref)\n");
ctxt->nbErrors++;
}
+ if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
+ if (ctxt->error != NULL)
+ ctxt->error(ctxt->userData,
+ "Found forbidden pattern attribute//element(ref)\n");
+ ctxt->nbErrors++;
+ }
/*
* reset since in the simple form elements are only child
* of grammar/define
***************
*** 6258,6263 ****
--- 6258,6264 ----
}
break;
}
+ case XML_RELAXNG_DEF:
case XML_RELAXNG_GROUP: {
xmlRelaxNGDefinePtr list;
***************
*** 6273,6278 ****
--- 6274,6283 ----
}
break;
}
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_PARENTREF:
+ ret = xmlRelaxNGValidateValue(ctxt, define->content);
+ break;
default:
TODO
ret = -1;
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]