Yes, it seems that the witango xerces implementation is validating the schema against the xsd schema file. And for whatever reason, is declaring the xml schema invalid.

Now, this xml is from the National Weather Service. RB, VB, Java 1.5, Xerces-J without the extra validations, and so forth, all parse it without error. Could it be that your implementation of Xerces in witango is too strict, and is causing errors, where they are not seen elsewhere? The text encoding was a hunch, cuz this xml is gzipped from NWS, and I have had to work through a ton of text encoding issues in wtiango, as you know those are present.

I looked at the XSD file, it seems valid to me, accept for the double mention as you saw, but whether that is allowed or not, i have no idea. But the "two_day_history_url" element doesn't seem to be a problem.

My point is, there have been several examples of xml that parses just about everywhere else, and not in witango. And the error this throws, should probably be a warning, or a setting as to whether or not the parser should be that strict.

If the xerces implementation in witango, is validating to the nth degree, don't you think it should be torqued down a bit, or maybe a parameter in the <@dom> tag to allow strict or a non strict implementation?

Cuz the issue is, many of us have seen witango error on xml that parse fine elsewhere, and so we take the approach, "You can't trust witango to parse xml reliably", and find other workarounds. With the current method, we would have to create a bean or something to test xml for encoding issues, then xml validity, before passing to xml. Which is why I had to write the witangoxmlcleaner bean.

This also goes back to documentation. You said, look at the readme, and we can see what library witango uses, Also, "read the xerces manual". But we have no idea how you have implemented xerces in witango, and I have shown the same library will parse this xml. So our only recourse, is pull your head out of your hair trial and error. And it is very frustrating. This kind of development without documentation is what negates the claim of ease of use, and rapid development.

-- 

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040

On Apr 26, 2006, at 11:14 PM, Ben Johansen wrote:



From: Phil Wade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 26, 2006 10:48 PM
To: [email protected]
Subject: Re: Witango-Talk: Parsing DOM Response for element by name

 

Robert,

If it is text encoding as you suggest there would have to be some character above ascii 127 to cause a problem and as far as I can see there isn't. Removing the namespace makes the XML parse which tends to indicate there is a problem with validation against the schema.

 

Your sample code is a pretty simplistic approach as you do not initialise the validator so your parser may not be getting the schema and validating the XML against it which would allow it to parse without error. You may want to check out the following xerces methods to see what state the parser validator has been initialised to. There is more to it than just get the text and parse when schemas are involved.

 

getValidationEnabled

setSchemaValidationEnabled

getSchemaValidationEnabled

setSchemaFullCheckingEnabled

 

 

Regards

 

Phil

 



________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to