-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
anyType + anySimpleType issue #103
Comments
as in this example https://github.com/goetas-webservices/xsd2php#dealing-with-xsdanytype-or-xsdanysimpletype, |
@goetas Same issue using this configuration:
|
Basically I am trying to use your lib in order to create the mapped related PHP classes from this XSD schema: http://www.aixm.aero/sites/aixm.aero/files/imce/AIXM511/aixm_5_1_1_xsd_with_local_copies.zip If you can check it out, I am on it since 2 days without success :) Thank you in advance. |
@goetas Hi! Any news on this topic and/or guideline? Thank you. |
Hi! I think I got it, basically the lib seems to not cover the case of having anyType or anySimpleType linked to any other namespace than 'http://www.w3.org/2001/XMLSchema' and in my case I have elements of type anyType and anySimpleType linked to the 'http://www.opengis.net/gml/3.2' namespace. iex:
Any feedback on this? |
Hmm... it could be that the namespaced anyType is not supported yet... :-/ |
@goetas Any tips, starting point in order to implement it? |
The any element is probably not supported by the xsd reader. You should add support for it in https://github.com/goetas-webservices/xsd-reader/blob/master/src/SchemaReader.php, after you will be able to assign to it a handler in this library |
@goetas I took time yesterday to dig more into your lib. I found the reason about anyType basically whenever an element is not declaring a Type is therefore implicitly (according to the rules of W3C XML Schema) an XML Schema anyType. But your lib still try to resolve it using the targetNamespace from the file the element is in my case targetNamespace="http://www.opengis.net/gml/3.2" and not from the http://www.w3.org/2001/XMLSchema namespace. I fix this by simply adding explicitly the type to this element type="anyType". Still could you please handle this case properly? Then, it seems that the lib does not handle the notion of deprecated types, I have a deprecatedTypes.xsd which declare all the element/types and other that are still part of the schema but deprecated, the lib still try to find the type in the related namespace without checking if it's a deprecated type. Could you also please handle this issue? |
i'm happy to see that you solved your issue.
did not know that, thanks for looking into it
would be happy to accept a PR
this seems a complete new feature, would be happy to accept a PR |
@goetas So if I understand clearly you are not maintaining anymore this lib. |
This is an open source project licensed under the MIT license (see https://github.com/goetas-webservices/xsd2php/blob/master/LICENSE.txt), with all pros and cons of it. The project is maintained for my needs and its progress depends on my available time to work on it. Currently I do not have a specific need for the feature you are asking, and nobody is paying me (yet) to implement it. All the projects that I'm working on do not have this usecase. |
@Adraesh how did you fix your problem? Where did you add element type="anyType"? Would you mind sharing it? Perhaps we could join forces to come up with a PR to improve this library? |
Hi!
First of all, thank you very much for this lib!
I am trying to make it work without success bellow my issue:
Though anyType and anySimpleType are well set to their alias as following:
The related handler's classes are registered as service and tag to jms_serializer.subscribing_handler as following:
Any idea? Thank you in advance.
The text was updated successfully, but these errors were encountered: