-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
base: master
Are you sure you want to change the base?
Conversation
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
@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')); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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. |
Added an incomplete and failing test case that shows what is missing. |
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