basic redefine support#48
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.
are you sure that redefine semantics is applied on schemaLocation and on the target namespace?
There was a problem hiding this comment.
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