Looking through Magento 2 di.xml files there are various types of xsi:noNamespaceSchemaLocation

When should we be using each schema?


It depends on the type of XML file you create.

Basically, all the XSD files can be found under the lib/internal/Magento/Framework folder, here is the list on 2.1.2:

enter image description here

For example, if you create a etc/acl.xml in your module, you'll have to use the acl.xsd file.

There are a few details about it in the official documentation:

My personal practice is: when I want to create an XML file, I check the same type of file in the core and get the URN schema from it.

Also, you can create your own XSD in case you want to use a custom type of XML: How can we write an XSD file in Magento 2?

  • makes perfect sense, thank you for the detailed answer
    – minlare
    Dec 7 '16 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.