Skip to content

load schema only when validating#9

Open
sirmmo wants to merge 5 commits into
azavea:masterfrom
marconilabs:master
Open

load schema only when validating#9
sirmmo wants to merge 5 commits into
azavea:masterfrom
marconilabs:master

Conversation

@sirmmo

@sirmmo sirmmo commented Sep 30, 2013

Copy link
Copy Markdown

In some conditions the app didn't work properly, so we added controls to avoid the loading of the remote XSD for non-validating calls.

@dzwarg

dzwarg commented Aug 1, 2014

Copy link
Copy Markdown
Contributor

@sirmmo, thank you for this PR. I was going through these today, and I wonder how you would accommodate the scenario where someone creates an SLD dynamically (not based on an existing SLD document), then attempts to validate it later?

At line 1488, the validate method validates the current document against the stored _schemadoc, which by your method won't be set if the schema is not loaded.

@sirmmo

sirmmo commented Aug 20, 2014

Copy link
Copy Markdown
Author

@dzwarg you are right, in fact. I was not using "validate" method while generating the sld, honestly. will move the xsd loading to the method (I think it would not be a big issue moving the xsd loading to the end of the xml generation process...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants