4

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 :

xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd

which resolves to the file :

vendor/magento/framework/Module/etc/module.xsd

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.

2
4

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.

0

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.