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

Unable to generate PHP classes from XSD file #143

Open
salisou opened this issue Jan 14, 2022 · 3 comments
Open

Unable to generate PHP classes from XSD file #143

salisou opened this issue Jan 14, 2022 · 3 comments
Labels

Comments

@salisou
Copy link

salisou commented Jan 14, 2022

I am using XSD-PHP for the first time . My goal is to convert XSD files to PHP classes using XSD2PHP

The following is the contents of my config.yml file

 xsd2php:
    namespaces:
      "": 'App\Dto\InfoCamereBilanci'
    destinations_php:
      'App\Dto\InfoCamereBilanci': app\Dto\InfoCamereBilanci
    #     'App\Dto\InfoCamereBilanci': soap\src # on Windows

destinations_jms:
  'App\Dto\InfoCamereBilanci': storage\bilanci\metadata
#    'InfoCamereBilanci': soap\metadata # on Windows

#  Uncomment this section if you want to have also symfony/validator metadata to be generated from XSD
#  destinations_validation:
#    'App\Dto\InfoCamereBilanci': validation
#    'App\Dto\InfoCamereBilanci': soap\validation  #  on Windows

aliases: # optional
  "http://www.xbrl.org/2003/instance/":
    union: "MyCustomMappedPHPType"
naming_strategy: short # optional and default
path_generator: psr4 # optional and default
#  known_locations: # optional
#    "http://www.example.org/test/somefile.xsd": somefile.xsd
#  known_namespace_locations: # optional
#    "urn:veloconnect:catalog-1.1": xsd/catalog-1.1.xsd

The error message I am getting in the command prompt is as follows
Can't find type named {http://www.w3.org/2001/XMLSchema}#, at line 160 in http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd

Any help would be appreciated thank you.

@simocheccoli
Copy link

Hello @goetas and thank you for the immense work you are doing!

Why is this issue marked as a question?

Are we doing something wrong? Should all custom simple types be configured as ad hoc classes?

@simocheccoli
Copy link

Hi @goetas, any news about our question?

@simocheccoli
Copy link

@goetas hi! can you help us?

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

No branches or pull requests

3 participants