doctrine-website
doctrine-website copied to clipboard
Mapping XSD - Website Version vs Repo Version
The XSD hosted on the website at https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd is currently being generated from https://github.com/doctrine/doctrine-website/blob/master/source/schemas/orm/doctrine-mapping.xsd. However this differs in some key ways from https://github.com/doctrine/orm/blob/2.9.x/doctrine-mapping.xsd.
Which XSD should be used for validating the XML mappings? As an example, the XSD in this repository requires that elements be ordered (such as <cascade>
before <join-columns>
) whereas the one hosted on the website does not. (Note: I am using xmllint
from libxml2-utils
for validation)
Some possibly related issues I found: https://github.com/doctrine/orm/issues/6968 https://github.com/doctrine/orm/pull/6728
Which XSD should be used for validating the XML mappings?
The best is ./vendor/doctrine/orm/doctrine-mapping.xsd
IMO: it's up to date and it's local.
Thanks, that's the one I'm currently using. Should the hosted one be versioned and based on the one in here?
From https://github.com/doctrine/doctrine-website/issues/92#issue-313909102
It needs to be located here
@jwage hi! What makes you say that? Shouldn't we recommend ./vendor/doctrine/orm/doctrine-mapping.xsd
for all intents and purposes? Or are there cases where it would be desirable to use an online versions (situations where Composer is not available but curl is).
I think this is a maintenance burden. Anyway, transferring the issue to the website since it can be generalized to other XSD files.
@greg0ire It would make more sense than having one xsd-file for every doc-version of ORM. Having a link to the file per version would be a nice-to-have though.