logo       


problem getting typeinformation after using DOMNormalizer: msg#00000

Subject: problem getting typeinformation after using DOMNormalizer

My xml editor totally depends on the functionality of the DOMNormalizer

In a try to suppress the addition of attributes (see discussion in http://www.nabble.com/Some-consideration-about-the-xerces-DOM-implementation-tf3602407.html) I wrote a DocumentListener that immediately removes the attributes that were added by the normalizer. This way I am getting the exact behavior I want:  Error messages for missing required attributes  are still reported, but the attributes are not already inserted in the document.

But now a very strange behavior was reported. In the editor I am retrieving the typedefinition by casting the attribute to an AttrPSVI. This way I can support the user by displaying combo boxes for enumeration.

If I have deleted attributes that were inserted, It looks like I am getting the wrong typeinfo for the remaining attributes. Is it possible the typeInfo is retrieved by a number and that  the removal of the attribute causes a mismatch?  Also the getValidity gives the wrong value.

You can see the behavior in my editor (http://www.donkeydevelopment.com). Put the attached xml and xsd in the same directory. Open the xml document and press the validate button. You will see that the error is reported on the wrong place and that the typeinfo in the combobox is wrong.
If you adjust the parameter "insert_default_attributes=false" to "insert_default_attributes=true"   in the XMLSpear.properties file, restart the editor and try again you will see the expected  behaviour. But this time I do not suppres the insert of the default attribute.

Of course I am not absoluty sure but I think it is a bug in xerces.

Using Xerces 2.9.0

Attachment: test.xml
Description: Text Data

Attachment: test.xsd
Description: Binary data

Dick Deneer

Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe