Re: [xml] Improper Type Returned For Repeated Attribute Declaration
- From: Daniel Veillard <veillard redhat com>
- To: Ashwin <ashwins huawei com>
- Cc: xml gnome org, ranjit huawei com
- Subject: Re: [xml] Improper Type Returned For Repeated Attribute Declaration
- Date: Wed, 26 Mar 2008 10:05:52 -0400
On Wed, Feb 27, 2008 at 07:12:19PM +0530, Ashwin wrote:
Hi,
In the attached file I am giving a repeated attr declaration for a1, so
the first a1 should be chosen and second one ignored, however in this case
the second attr is being considered and in the start element ns callback >
I am getting a default attribute, which in this case I should not get, since
a1 should be treated as #IMPLIED, instead it is being treated as #FIXED. >
So I think the problem of the repeated attr declaration in which the second
attr value is being considered still exists.....
For the above problem I am attaching a patch, but I am not sure whether it
is correct, I might have missed out some flow in which the patch might not
work or cause some problems. I am checking using the hash scan to check if
an attr is being repeated , and in case it is then I return from there
before adding the default attributes, this testcase is passing along with
some other combinations that I tried. Please let me know if this is correct.
Yes that looks correct because during the DTD parsing phase we accumulate all
attributes definitions in ctxt->attsSpecial, so that's a valid way to test
for an existing definition of the attribute at that time.
Patch applied and commited to SVN,
thanks !
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]