On Monday 05 November 2007 14:10:17 Andrea Aime wrote:
> mzorova ha scritto:
> > Running org.geotools.styling.SLDStyleTest
> > [Fatal Error] :1:117: The prefix "sld" for element
> > "sld:StyledLayerDescriptor" is not bound.
> > Nov 4, 2007 2:02:00 PM org.geotools.styling.SLDParser parseUserLayer
> > INFO: layer name: Second_User_Layer
> > Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.208
> > sec <<< FAILURE!
> >
> > Is there something I am doing wrong?
>
> The official builds are done with jdk 1.4 only, I'm
> not too surprised something breaks with latest 1.5,
> apparenlty they changed something in the xml parsing
> subsystem. If you can grab the report for the
> failed test in target/surefire_reports we may try to
> understand what went wrong.

I ran into this one as well. Here's the report:

-------------------------------------------------------------------------------
Test set: org.geotools.styling.SLDStyleTest
-------------------------------------------------------------------------------
Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.12 sec <<< 
FAILURE!
testSLDTransformer(org.geotools.styling.SLDStyleTest)  Time elapsed: 0.009 sec  
<<< ERROR!
java.lang.RuntimeException: org.xml.sax.SAXParseException: The prefix "sld" 
for element "sld:StyledLayerDescriptor" is not bound.
        at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:325)
        at 
org.geotools.styling.SLDStyleTest.testSLDTransformer(SLDStyleTest.java:185)


The error is entirely correct: I've checked, and the XML that comes out of 
SLDTransformer does indeed not contain a namespace binding for the "sld" 
prefix (nor for the ogc prefix, or any other than the default prefix).

ContentHandlerFilter seems to be fine; it's setting things properly before 
passing the attributes to original. XMLReaderSupport.parse also seems to be 
settings things up properly. Somehow these xmlns declarations disappear 
however. I've been unable to find the problem, but I'm not exactly a SAX 
expert. Perhaps it has something to do with the 
http://xml.org/sax/features/namespace-prefixes feature? Judging by 
http://www.saxproject.org/get-set.html I'm thinking it might have to be set 
to true, but I can't figure out how or where to do that. The things I've 
tried have got me nothing but SAXNotRecognizedExceptions...

Any help welcome,

Lourens

-- 
           ir. Lourens Veen           University of Amsterdam - IBED
                                      Nieuwe Achtergracht 166
     Scientific Software Engineer     1018 WV Amsterdam, The Netherlands
              EcoGRID-GA-N            t: +31 20-5257453  f: +31 20-5257431

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to