Hi Jayachandra, Talking about OM with invalid xmls. I think this should be handled in the parser level, meaning if there is an un conformity to XML 1.0, parser should throw an error. Isn't it ?
Are there any errors that are sliped from parser and should be detected in the OM level. Mind you pure OM doesn't have any validation code, its just an object model. Am I missing something ?? BTW : your email seems scrambled to me. Any problem with your mail server, or mine (ohh !!) -- Chinthaka > -----Original Message----- > From: jayachandra [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 26, 2005 12:22 PM > To: Sanjiva Weerawarana > Cc: [email protected] > Subject: Re: [Axis2] [Update] XMLConformace Testing Report. > > Hi! > Sanjiva, we do have issues with OM as well. -->To start with, OM lacks PI, > comments and DTD support. On my end, Iadded their implementation into OM > code base and then ran the test.-->A default namespace for 'xml' prefix is > supposed to be in the scopeof every XML element. I did a work around on my > machine as todeclaring this namespace inside the OMElementImpl constructor > methodsitself, before running the tests.-->The 'baseURI' property support > is not provided by OM insideOMElement. If we can keep track of this one > thing in OM it can help usreduce the number of parsed tests that fail at > comparison phase by agood number (a few fifties). > However, getting a 100% success is unlikely without *full* > DTDimplementation built into OM. Alek was saying DTD support is not > thatwell implemented in stAX, it seems, and if that be the need > hesuggested to use woodstox. > And Sanjiva, just to be extra cautious that I don't give out wrongsignals > :-)... so far I tested OM against *only* valid XMLs of 1.0version that > should be parsed and serialized using any infosetimplementation. We > haven't tested OM against how well it can _reject_invalid and ill-formed > XMLs. They actually form the larger fraction ofthe XMLsuite about 1800 :-( > Thanks for all your supportByeJaya > On 4/25/05, Sanjiva Weerawarana <[EMAIL PROTECTED]> wrote:> Hi Jaya,> > > Wow, thanks for all the hard work on this!> > Do I read your report > correctly as this test didn't find any bugs> in the OM level but rather > encountered difficulties in the parser> level?? If so I'm very happy :-).> > > Of the passing ones, what made 735-567 documents not compare> > successfully? Can we fix that?> > Thanks,> > Sanjiva.> > ----- Original > Message -----> From: "jayachandra" <[EMAIL PROTECTED]>> To: <axis- > [EMAIL PROTECTED]>> Sent: Monday, April 25, 2005 7:26 PM> Subject: [Axis2] > [Update] XMLConformace Testing Report.> > > Hi all,> > Total file count in > W3C XMLSuite :2634 (this includes, valid, invalidand> illformed xmls too) > Of them, valid ones :960 (i.e.> excluding invalidand > illformed xmls. However this includes XMLs of both> versions 1.0and 1.1)> > > Of them, valid XML1.0 ones :832 (i.e excluding xmls from> > 1.1version folders. Since the MXParser we have beneath is only > 1.0compliant)> > On this final set, when OM is tested as is. 335 files got > parsedproperly,> and 309 files had the serialized XML matching the input > file(comparison> test). I've implemented OMComment and OMPI and did > minimalistic> OMDTD(without validation etc.) support. And with those > changes the> parsingrate increased to 735 and comparison success reached > 567.> > The parsing failures found can be attributed to one or more of> > thefollowing observations I could make. This is not an exhaustive> > listthough.> > 1. For files where XML declaration line has a mention of> > 'standalone'attribute prior to 'encoding' attribute, underlying MXParser> > threw anexception with a message reading something like "Expected 'e'> > inencoding and not 's' ". Alek! Is this a known issue with STAX. What > doyou> think?> > 2. For files in which DTD declaration has right square > bracket (']')as a> literal value of some entity, MXParser is treating it > as end ofDTD> declaration.> > 3. Some xmls having multi byte characters > (UK currency pound signamongst> others) are failing to get parsed with > typical exceptionmessages like only> whitespace content allowed before > start tag and not\ufffd. I have passed a> "UTF-8" aware reader to the > builder, do I needto use something else here?> > 4. Apart from these > because I couldn't implement the complete DTD infoset> implementation, > some more files are failing to get parsed.> > Regarding the comparison, > some of the observed reasons of failures are�> > 1. Many SYSTEM > identifiers in DTD declarations used a relativereference> and so far we > don't have considered 'baseURI' property (doesSTAX parser> provide one?) > for any of the elements and hence the XMLcomparator (xmlunit)> couldn't > resolve the system identifiers therebyleading to a mismatch between> the > serialized xml and the originalinput form.2. Also since the DTD support> > is na�ve, the presentation of data iscompletely ignored thereby leading > to> scenarios like, serializing as#PCDATA when DTD says CDATA. This also > lead to> significant comparisonfailures.> > ThanksJaya> > ---- Jaya> >> > > > -- -- Jaya
