|
From: Chris H. <ch...@op...> - 2005-04-15 08:37:37
|
Was supposed to email this yesterday, but had to get off the internet... My first big beef with the current sld parser is it uses DOM Filter parsing. I think the DOM SLD parsing is decent, but it kills me whenever I have to maintain the DOM Filter parser. I have spent a _ton_ of time getting the SAX Filter parsing working perfectly (ok, as good as it can without lazy loading). GeoServer has done a massive QA job on it. It should be able to handle all the Filters in SLD that it handles in WFS. So that's why I personally cringe every time I use it. One small correction on David's bit about validating. We're not yet validating against the schema in GeoServer. That's my last thing to do if we're still going to be working with the DOM parser. But it's a bit more tricky then I thought at first, since we'd need to get it to reference our schema file, since often the schema file of an user defined SLD will be wrong, or at least without a schemaLocation. Of course the XDO makes this trivial, but we're not yet using that parser. So what I check now is just that there are no SAX errors, and that the DOM doesn't completely choke. Problem is the DOM SLD parser will _not_ give you any sort of meaningful message if you pass it say a describe.xml file (which I did). It will just not return a Style. But it won't even say that it couldn't find a UserStyle element. It will just return nulls, it won't return errors. Basically from a GeoServer perspective we should be able to generate meaningful errors to help correct what might be wrong with the SLD files that users try to submit. I am not yet convinced that XDO does this well, since the only error messages I've seen out of it (personally, and I admit I've not used it much), are extraordinarily unhelpful. Personally if I had the time and inclination to do this I'd use SAX, or maybe check out the streaming xml parser that Jody and them found, that does most everything well except the schema support. Chris ---------------------------------------------------------- This mail sent through IMP: https://webmail.limegroup.com/ |