Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping XSD - Website Version vs Repo Version #405

Open
internalsystemerror opened this issue May 27, 2021 · 4 comments
Open

Mapping XSD - Website Version vs Repo Version #405

internalsystemerror opened this issue May 27, 2021 · 4 comments

Comments

@internalsystemerror
Copy link

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:
doctrine/orm#6968
doctrine/orm#6728

@greg0ire
Copy link
Member

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.

@internalsystemerror
Copy link
Author

Thanks, that's the one I'm currently using. Should the hosted one be versioned and based on the one in here?

@greg0ire
Copy link
Member

From #92 (comment)

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 greg0ire transferred this issue from doctrine/orm May 28, 2021
@SenseException
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants