matthiasblaesing opened a new pull request, #6245: URL: https://github.com/apache/netbeans/pull/6245
NetBeans allows users to register DTDs and XSD to support code completion and validation for XML files referencing them. For DTDs it is possible to register them either by their `public ID` or their `system ID`. For XSD only the registration based on `system ID` was used. This in turn requires the document to be validated to carry a `xsi:schemaLocation` and/or `xsi:noNamespaceSchemaLocation` attribute to link the XSD to the XML. That makes sense where the namespace itself is not an identifier. For example Jakarta EE 9 used one big namespace: `https://xmlns.jakarta.ee/jakartaee`, but multiple grammars (e.g. https://jakarta.ee/xml/ns/jakartaee/jakartaee_9.xsd and https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd). On the other hand there can be approaches where the namespace identifies the grammer uniquely. For these cases validation and code completion was enhanced to allow for this. In #6226 an example was provided, that looks like this: ```xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <rde:deposit xmlns:rde="urn:ietf:params:xml:ns:rde-1.0" xmlns:rdeHost="urn:ietf:params:xml:ns:rdeHost-1.0" xmlns:rdeEppParams="urn:ietf:params:xml:ns:rdeEppParams-1.0" xmlns:epp="urn:ietf:params:xml:ns:epp-1.0" xmlns:ns5="urn:ietf:params:xml:ns:rdeCsv-1.0" xmlns:rdeHeader="urn:ietf:params:xml:ns:rdeHeader-1.0" xmlns:rdeNNDN="urn:ietf:params:xml:ns:rdeNNDN-1.0" xmlns:rdeIDN="urn:ietf:params:xml:ns:rdeIDN-1.0" xmlns:rdeRegistrar="urn:ietf:params:xml:ns:rdeRegistrar-1.0" xmlns:rdeDomain="urn:ietf:params:xml:ns:rdeDomain-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:rdeContact="urn:ietf:params:xml:ns:rdeContact-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" type="FULL" id="F202006291123" resend="0"> <rde:watermark>2020-06-29T00:00:00.000Z</rde:watermark> <rde:rdeMenu> <rde:version>1.0</rde:version> <rde:objURI>urn:ietf:params:xml:ns:rdeHeader-1.0</rde:objURI> <rde:objURI>urn:ietf:params:xml:ns:rdeContact-1.0</rde:objURI> <rde:objURI>urn:ietf:params:xml:ns:rdeHost-1.0</rde:objURI> ``` each namespace uniquely identifies the grammar that defines it. There is no `schemaLocation` attribute, so the schemas need to be mapped:   Then XML validation works:  And the editor can provide schema based completion:  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- 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
