net.refractions.udig.style.sld.editor
Class SLDValidator
java.lang.Object
net.refractions.udig.style.sld.editor.SLDValidator
public class SLDValidator
- extends java.lang.Object
SLDValidator borrowed from geoserver org.vfny.geoserver.util
- Since:
- 1.1.0
- Author:
- chorner
|
Method Summary |
static java.lang.String |
getErrorMessage(java.io.InputStream xml,
java.util.List<org.xml.sax.SAXParseException> errors)
|
static java.lang.String |
getErrorMessage(java.io.Reader xml,
java.util.List<org.xml.sax.SAXParseException> errors)
returns a better formatted error message - suitable for framing. |
java.util.List<org.xml.sax.SAXParseException> |
validateSLD(org.xml.sax.InputSource xml,
java.lang.String SchemaUrl)
validate a .sld against the schema |
java.util.List<org.xml.sax.SAXParseException> |
validateSLD(java.io.InputStream xml,
java.lang.String SchemaUrl)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SLDValidator
public SLDValidator()
getErrorMessage
public static java.lang.String getErrorMessage(java.io.InputStream xml,
java.util.List<org.xml.sax.SAXParseException> errors)
getErrorMessage
public static java.lang.String getErrorMessage(java.io.Reader xml,
java.util.List<org.xml.sax.SAXParseException> errors)
- returns a better formatted error message - suitable for framing. There's
a more complex version in StylesEditorAction. This will kick out a VERY
LARGE errorMessage.
- Parameters:
xml - errors -
- Returns:
- DOCUMENT ME!
validateSLD
public java.util.List<org.xml.sax.SAXParseException> validateSLD(java.io.InputStream xml,
java.lang.String SchemaUrl)
validateSLD
public java.util.List<org.xml.sax.SAXParseException> validateSLD(org.xml.sax.InputSource xml,
java.lang.String SchemaUrl)
- validate a .sld against the schema
- Parameters:
xml - input stream representing the .sld fileSchemaUrl - location of the schemas. Normally use
".../schemas/sld/StyleLayerDescriptor.xsd"
- Returns:
- list of SAXExceptions (0 if the file's okay)