-
Notifications
You must be signed in to change notification settings - Fork 93
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
Provide automatic completion/validation in catalog file #204
Comments
To do that we must return the well XML Schema according the xmlns. We have 2 choices:
|
@ralfhandl I think you could be interested with this issue: Please give us feedback |
I'd definitely like to have automatic completion/validation of catalog files. Got validation of my catalog.xml working by starting it with <?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="./schemas/catalog.xsd" />
<uri name="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="./schemas/catalog.xsd" /> Now vscode-xml knows how to validate catalog files 😄 Would it be possible to have an "implicit" catalog with these entries that is packed into vscode-xml, together with the catalog XSD? I got http://xmlcatalogs.org/schema/1.1/catalog.xsd from http://xmlcatalogs.org/. PS: I'm no expert on XML catalogs but it strikes me as odd that I always need two catalog entries for the same XML namespace:
Should I open a separate issue for that`? |
My work with 84391cb#diff-13747ce199e06fc38bd7e093a60e4a34R34 should call the http://xmlcatalogs.org/schema/1.1/catalog.xsd from http://xmlcatalogs.org/ when "urn:oasis:names:tc:entity:xmlns:xml:catalog" is declared, it works great in my laptob, but we have test problem that I must fix it to enable it again. But for the moment, if you wish to have completion and validation for catalog, you can declare your XMl Schema in your catalog and it should work.
Yes you hav ethis problem, please create an issue for that. I must debug Xerces to understand how it works (me too I don't know catalog). |
Now #215 was fixed, I have re-enabled XML Catalog plugin. If build tests passed, this issue should be fixed. |
@ralfhandl build is passing, please retry this issue, thanks! |
@angelozerr not sure what was fixed/changed: validation and completion of "my" XML files (still) works with build #502. Validation and completion of catalog files only works if the catalog contains the entry <public publicId="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="./schemas/catalog.xsd" /> Needing Thanks for the quick support! |
Sorry @ralfhandl please reinstall it, now you should have compeltion and validation (based on XML Schema catalog) for : <?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
//Should provide completion here
<bad /> // error validation, because "bad" doesn't belong to the XML Schema catalog
</catalog>
Yes sure, but this issue os for your XML catalog file, not for XML files bound to the catalog.
Yes I know. I will study more #217 |
+1, works now with build #505 |
@angelozerr are there any tests so we can close this one? |
No I must write tests. |
Ideally, we should get completion in catalog files:
The text was updated successfully, but these errors were encountered: