If you look in src\org\vfny\geoserver\util\SLDValidator.java line about
180, you'll see:

File schemaFile = new File(GeoserverDataDirectory
                .getGeoserverDataDirectory(servContext),
                "/data/capabilities/sld/GetMap.xsd");

which would explain why its not finding the schema files!

If you're interested in how the schema validation workings, head down to
line 210 and you'll see the main function.  The only thing intestesting
in the whole file are these lines:

parser.setFeature("http://xml.org/sax/features/validation";, true);   
parser.setFeature("http://apache.org/xml/features/validation/schema";,
                true);
parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking";,
                false);
parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation";,
                SchemaUrl);
parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation";,
                "http://www.opengis.net/sld " + SchemaUrl);

These lines:
1. tell the parser to validate the XML document vs the schema
2. does not validate the schema (the GML schema is *not* valid.  This is
an OGC blunder)
3. tells the validator that the tags without a namespace are actually
SLD tags.
4. tells the validator to 'override' the SLD schema that a user may
include with the one inside geoserver.





----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to