You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Aelony, Avram" <Av...@mpi.com> on 2002/05/01 21:23:09 UTC

debug as the name of an attribute?

I came across strange behavior that I thought I'd pass along.  I don't think it is necessarily a bug, just something to consider.  

I have a program that uses Xerces 1.6.0 to parse an xml file that serves as a configuration run file. The program runs differently depending on the content on the xml run file.  My working versions of the program had various cout statements indicating how the particular run was progressing.  After finishing some testing, I thought that I would create a new attribute to an existing XML element tag called 'debug' and only have these cout statements print when the XML run file indicated something like

<preferences debug="yes" />

To my surprise, introducing the attribute with the name 'debug' had some strange affects.  
Using the same XML run file and testing with both versions of the program (debug tag enabled and the original version), I noticed that at least one end element tag for a subsequent tag (not the preferences tag) was missed by Xerces when the XML run file contained the attribute 'debug'. It did this without regard to the setting of 'debug' (yes, no, blank, etc..).

Then it dawned on me that the word 'debug' might indicated something special within Xerces.  I have now changed the attribute name that my program recognizes from 'debug' to something different, and now I no longer see strange effects like missed end element tags.

The problem appears to have been resolved (in my program) but at the same time, I think this is kinda crazy.  If anyone has heard of such a scenario, or has an explanation I would be grateful to hear it.

thanks,
Avram


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: debug as the name of an attribute?

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Aelony, Avram" <Av...@mpi.com> writes:

> I came across strange behavior that I thought I'd pass along.  I
> don't think it is necessarily a bug, just something to consider.  

Well it's definately a bug if you can find a file that shows improper
behavior with DOMPrint or SAXPrint.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org