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

basic redefine support #48

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cebe
Copy link
Contributor

@cebe cebe commented Apr 2, 2019

based on #17
by @kstasik

ported code to latest version/rebased on master.

implements <xsd:redefine ...> https://www.w3.org/TR/xmlschema11-1/#modify-schema

Kacper Stasik and others added 3 commits April 2, 2019 12:14
based on goetas-webservices#17
by @kstasik

ported code to latest version/rebased on master.

implements `<xsd:redefine ...>` https://www.w3.org/TR/xmlschema11-1/#modify-schema
support redefine if file is already loaded
cover the case when file has not been loaded yet
@cebe cebe marked this pull request as ready for review April 2, 2019 10:15
@cebe
Copy link
Contributor Author

cebe commented Apr 2, 2019

@goetas this one is ready for review/merge too. Let me know if you have any questions about this.

Unit tests are covering everything relevant as far as I see. Going to test it on my current spec now.

private function loadRedefine(Schema $schema, DOMElement $node): Closure
{
$base = urldecode($node->ownerDocument->documentURI);
$file = UrlUtils::resolveRelativeUrl($base, $node->getAttribute('schemaLocation'));
Copy link
Member

@goetas goetas Apr 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that redefine semantics is applied on schemaLocation and on the target namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that it implements all semantics defined for it but it works for the case where additional Elements and Types are added to a namespace. this is what is covered in the test cases from the original PR and also in the case I extracted from the spec I am currently working with.

@cebe
Copy link
Contributor Author

cebe commented Oct 23, 2019

I tested this more thoroughly and found that this is not complete. redefine semantics are not met with the current code.

I have no time and interest to work on this right now, just added this comment to make the state of this PR more clear.

@cebe
Copy link
Contributor Author

cebe commented Oct 23, 2019

Added an incomplete and failing test case that shows what is missing.

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

Successfully merging this pull request may close these issues.

None yet

2 participants