Hi Thomas, I just tried it on my local Netbeans 10 and it works when you make the System ID a full URL.
So in your XML put: xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd http://www.some-domain.com/my/lb http://www.some-domain.com/my.xsd”> then map System-ID http://www.some-domain.com/my.xsd <http://www.some-domain.com/my.xsd> to your local XSD file in the Tools -> DTS’s and XML Schemas -> User Catalog Actually I did not know that Netbeans can cache XSDs to avoid the lookup to the (often not existent) public http server. Nice feature Regards Stefan > On 07.02.2019, at 13:24, Thomas Kellerer <[email protected]> wrote: > > So no one is using the XML editor with XSDs outside the XML file's directory? > > Thomas Kellerer schrieb am 31.01.2019 um 09:58: >> Hello, >> >> I am using NetBeans 10.0 >> >> I am developing extensions for Liquibase in my project. >> So I have an additional XSD that defines the extension tags. >> >> My Liquibase changelogs (using my extensions) look like this: >> >> <databaseChangeLog >> xmlns="http://www.liquibase.org/xml/ns/dbchangelog" >> xmlns:my="http://www.some-domain.com/my/lb" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog >> http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd >> http://www.some-domain.com/my/lb my.xsd"> >> >> .... >> >> </databaseChangeLog> >> >> >> The "http://www.some-domain.com/my/lb my.xsd" part is the where my >> extensions are defined. >> >> However, when editing those XML files I can't get NetBeans to validate the >> XML because it does not find "my.xsd" as it is located in a different >> directory than the XML file itself. >> >> So I tried to add the XSD through "Tools -> DTDs and XML Schemas" >> >> I selected the "User Catalog" and added a local XSD. >> I tried specifying "my.xsd" as the "System ID" as well as >> "http://www.some-domain.com/my/lb" in the dialog that pops up, but neither >> solution worked. >> >> When I validate my XML file (through the two "down arrows" in the editor - >> Alt- Shift - F9) I get the following errors: >> >>> schema_reference.4: Failed to read schema document 'my.xsd', because >>> 1) could not find the document; 2) the document could not be read; 3) >>> the root element of the document is not <xsd:schema>. [11] >> As soon as I copy the my.xsd into the same folder as my XML file, the >> validation works. >> >> What am I missing here? >> >> >> Thanks >> Thomas > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists >
