From: Chris H. <ch...@op...> - 2003-02-12 20:36:45
|
I think it is deeper problem than just the geotools code. XML strings actually aren't allowed to use newline and carraige-return characters (At least that's what it says in this wrox book I'm reading to learn about XML schemas). So both of the XML features are technically illegal (at least how they are displayed in my email client, though if the first actually is supposed to be all in the same line then it should be fine). Our GML Parser code just uses the SAX startElement method, over-riding XMLFilterImpl, which is how you write a customized SAX parser. I'm actually having trouble replicating your error (though I'm using a specialized geoserver feature parser, which is used for inserts (where there is not a featureMember value). I don't have time right now to fully investigate the problem, but I suspect it may be something like the SAX Parser that your java uses maybe chokes in someway if there is a newline character. Or possibly the value is there, but with a newline in front of it so it doesn't display in whatever you're using to view it). If it's the later we could put in code to strip out newlines, carraige returns and the like, which you might try doing in GMLFilterFeature, and see how that works. Ok, back to my schemas... Chris That method has an Attributes object as one of its parameters, and all the geotools code does is get the attribute names and values. If there is a newline character, Attributes.getValue(i) of that attribute On Tue, 11 Feb 2003, SourceForge.net wrote: > GT2 bugs item #684925, was opened at 2003-02-11 21:42 > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=503715&aid=684925&group_id=4091 > > Category: gmldatasource > Group: glitch > Status: Open > Resolution: None > Priority: 5 > Submitted By: James Macgill (jmacgill) > Assigned to: Ian Turton (ianturton) > Summary: formating of gml can miss out attributes > > Initial Comment: > The current parser treats the following differently: > (inline text) > <ccg:road fid="road1"> > <ccg:description>The East > Highway</ccg:description> > <gml:LineString gid="1" > srsName="http://?/epsg.xml#ESPG:4326"> > <gml:coordinates> > 0,25 30,25 > </gml:coordinates> > </gml:LineString> > </ccg:road> > > (multi line text) > <ccg:road fid="road1"> > <ccg:description> > The East Highway > </ccg:description> > <gml:LineString gid="1" > srsName="http://?/epsg.xml#ESPG:4326"> > <gml:coordinates> > 0,25 30,25 > </gml:coordinates> > </gml:LineString> > </ccg:road> > > The second is parsed to have only two attributes, the > description attribute is missing. Any idea what is > causing this? > > > > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=503715&aid=684925&group_id=4091 > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > |