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

External DTD Validation not working #8

Closed
vaibhav-bansal opened this issue Mar 25, 2017 · 6 comments
Closed

External DTD Validation not working #8

vaibhav-bansal opened this issue Mar 25, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@vaibhav-bansal
Copy link

vaibhav-bansal commented Mar 25, 2017

Exalt doesn't detect the external DTD file or maybe it detects but can't read the definitions in the file when I select Validate Document. It works perfectly with Internal DTD and XSD files.
And thank you for making this plugin. Really made my work easy.

1. Summary

Doesn't read the DTD definitions in the external DTD file.

2. Expected Behavior

Should notify "Valid markup".

3. Actual Behavior

Didn't read the definitions and notified "No declarations for element bookDB".

4. Code Used

XML File- bookDB.xml
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE bookDB SYSTEM "bookDB.dtd">

<bookDB>
	<book>
		<name>Five Point Someone</name>
		<author>Chetan Bhagat</author>
	</book>
	<book>
		<name>I Too Had A Love Story!</name>
		<author>Ravindra Singh</author>
	</book>
	<book>
		<name>Goosebumps - The Werewolf of Fever Swamp</name>
		<author>R. L. Stine</author>
	</book>
</bookDB>

DTD File- bookDB.dtd

<!ELEMENT bookDB (book+)>
<!ELEMENT book (name,author)>
<!ELEMENT name (CDATA)>
<!ELEMENT author (CDATA)>

5. Environment

Operating System: Windows 8.1 x64 EN
Sublime Text: Build 3126

Thanks.
@eerohele
Copy link
Owner

Glad to hear you find it useful!

Yeah, Exalt doesn't support SYSTEM identifiers at the moment. I'll see what I can do about that.

eerohele pushed a commit that referenced this issue Mar 27, 2017
@eerohele eerohele self-assigned this Mar 30, 2017
@eerohele eerohele added the bug label Mar 30, 2017
@eerohele eerohele modified the milestones: 0.3.1, 0.3.2 Mar 30, 2017
@eerohele
Copy link
Owner

@vaibhav-bansal: v0.3.2 should fix the issue. Can you try updating the plugin, restarting Sublime Text, and checking whether the issue is fixed for you?

@vaibhav-bansal
Copy link
Author

Thanks for the update and yes, it worked.
I checked it with the same code I posted above. Now, it's detecting the external DTD and validating it correctly.
But, there's an issue.
When I change the definitions in the DTD file, it is not able to validate it right away.
I have to restart Sublime to validate the changes.
Thanks.

@eerohele
Copy link
Owner

By default, Exalt caches the schema for a document for performance reasons.

You should be able to run the "Exalt: Clear Parser Cache" command after updating the DTD instead of restarting Sublime Text. Please let me know if that doesn't work, though.

@vaibhav-bansal
Copy link
Author

Yipee! It works perfectly. Thank you so much Sir!!
😄 😆

@eerohele
Copy link
Owner

eerohele commented Apr 2, 2017

Glad to hear it. I'll close this one, but feel free to comment if you discover any other aspects related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants