Re: Attributes are written in lower case

Felix Röthenbacher <[email protected]> Thu, 08 Sep 2005 14:31:51 +0200
Newsgroups gmane.editors.bitflux.general
Message-ID <[email protected]>
Hi Chregu

I didn't find the time to extract a reproducable example. Basically,
just add an attribute with chars in uppercase.

I did some further investigation and found out, that replacing
o.hasAttribute(this.name) with o.hasAttributeNS(null, this.name)
in the file AttributeVDOM.js does the trick re validation.
If it comes to a save operation after editing the attribute,
it is still written in lowercase and bitflux complains that it is not
valid.

I suspect that there is a bug in the Gecko DOM implementation,
as Element.hasAttribute() does not work correctly.
Maybe there is a problem with the getAttribute() function
(possibly it's also used in hasAttribute()).

- Felix


Christian Stocker wrote:
>=20
> On 8.9.2005 10:44 Uhr, Felix R=F6thenbacher wrote:
>=20
>>Hi
>>
>>I have a problem with a relaxng that contains attributes with uppercase
>>chars, e.g. 'RevisionId'. While loading, bitflux complains that the
>>attribute is missing, though the xml file contains the attribute.
>>
>>When trying to edit the attribute and save it, bitflux still complains
>>when validating. Interestingly, when the xml is output, it contains
>>something like this: <tag RevisionId=3D"..." revisionid=3D"..."/>
>>
>>My guess is that something with the attribute handling fails. I
>>checked for all .toLowerCase() calls but did not find the
>>place where the attribute is converted to lowercase.
>=20
>=20
> without looking at the code, i'd suspect that as we output it in html
> and take the attributes from there, that mozilla does lowercase them.
> Bad and I have no quick workaround for that. But at least it shouldn't
> complain during load, since that's the original XML. Is it possible,
> that you can send me a short reproducable example (relaxng.xml,
> content.xml, external.xhtml), so that i don't have to try to reproduce
> it by myself
>=20
> chregu
>=20
>>Any help is very appreciated.
>>
>>
>>- Felix
>>
>=20
>=20

--=20
Felix R=F6thenbacher                  [email protected]
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

--=20
bx-editor-users mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-users