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

XML completion based on internal DTD #251

Closed
angelozerr opened this issue Dec 4, 2018 · 3 comments
Closed

XML completion based on internal DTD #251

angelozerr opened this issue Dec 4, 2018 · 3 comments
Labels
completion This issue or enhancement is related to completion support DTD enhancement New feature or request
Milestone

Comments

@angelozerr
Copy link
Contributor

No description provided.

@angelozerr angelozerr added enhancement New feature or request completion This issue or enhancement is related to completion support DTD labels Dec 4, 2018
@angelozerr angelozerr added this to the v0.0.3 milestone Dec 5, 2018
@angelozerr angelozerr added the needs tests This issue is probably fixed but needs regression tests label Dec 5, 2018
@angelozerr
Copy link
Contributor Author

@fbricon it should work now. I have written tests.

You can play with this XML:

  • completion with element:
<?xml version = "1.0"?>
<!DOCTYPE Folks [
	<!ELEMENT Folks (Person*)>
	<!ELEMENT Person (Name,Email?)>
	<!ATTLIST Person Pin ID #REQUIRED>
	<!ATTLIST Person Friend IDREF #IMPLIED>
	<!ATTLIST Person Likes IDREFS #IMPLIED>
	<!ELEMENT Name (#PCDATA)>
	<!ELEMENT Email (#PCDATA)>
	]>
<Folks>
	| // here completion should provide Person element
</Folks>
  • completion with attribute:
<?xml version = "1.0"?>
<!DOCTYPE Folks [
	<!ELEMENT Folks (Person*)>
	<!ELEMENT Person (Name,Email?)>
	<!ATTLIST Person Pin ID #REQUIRED>
	<!ATTLIST Person Friend IDREF #IMPLIED>
	<!ATTLIST Person Likes IDREFS #IMPLIED>
	<!ELEMENT Name (#PCDATA)>
	<!ELEMENT Email (#PCDATA)>
	]>
<Folks>
	<Person | // here completion should provide Pin , Friend, Likes attributes
</Folks>

Please note that completion works only if DTD must is not malformed (like external DTD)

Please close the issue if it works for you.

@angelozerr
Copy link
Contributor Author

@fbricon could you play with feature and close it, if you think it's good for you. Thanks!

@angelozerr angelozerr removed in progress needs tests This issue is probably fixed but needs regression tests labels Dec 7, 2018
@angelozerr
Copy link
Contributor Author

@fbricon please reopen it if you find bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completion This issue or enhancement is related to completion support DTD enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants