Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load schema only when validating #9

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sirmmo
Copy link

@sirmmo sirmmo commented Sep 30, 2013

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
Copy link
Contributor

dzwarg commented Aug 1, 2014

@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
Copy link
Author

sirmmo commented Aug 20, 2014

@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