when I open up a magento2 module.xml file, I see the location of the default module.xsd schema, if there is not a schema already set, defined like this :


which resolves to the file :


My questions, although it may be stupid, is how does it know that

urn:magento: resolves to vendor/magento/

I am really interested about that.


1 Answer 1


Take a look at the implementation of \Magento\Framework\Config\Dom\UrnResolver::getRealPath, this particular method is responsible for URN conversion into real schema file path.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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