Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]
Show
Ignore:
Timestamp:
06/19/07 23:21:24 (1 year ago)
Author:
nahi
Message:
  • let xsd2ruby.rb generate a mapping registry and a mapper from XML Schema definition. the mapper has obj2xml and xml2obj which uses the generated mapping registry. you can use this instead of XSD::Mapping.obj2xml and XSD::Mapping.xml2obj which does not know anything about mapping. closes #362, #363.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bin/xsd2ruby.rb

    r1437 r1857  
    1111  OptSet = [ 
    1212    ['--xsd','-x', GetoptLong::REQUIRED_ARGUMENT], 
    13     ['--classname','-n', GetoptLong::NO_ARGUMENT], 
     13    ['--module_path','-m', GetoptLong::REQUIRED_ARGUMENT], 
     14    ['--classdef','-e', GetoptLong::OPTIONAL_ARGUMENT], 
     15    ['--mapping_registry','-r', GetoptLong::NO_ARGUMENT], 
     16    ['--mapper','-p', GetoptLong::NO_ARGUMENT], 
    1417    ['--force','-f', GetoptLong::NO_ARGUMENT], 
    1518    ['--quiet','-q', GetoptLong::NO_ARGUMENT], 
     
    4447 
    4548Example: 
    46   #{ $0 } --xsd myapp.xsd --classname Foo 
     49  #{ $0 } --xsd myapp.xsd --classdef foo 
    4750 
    4851Options: 
    4952  --xsd xsd_location 
    50   --classname classname 
     53  --classdef [filenameprefix] 
     54  --mapping_registry 
     55  --mapper 
     56  --module_path [Module::Path::Name] 
    5157  --force 
    5258  --quiet 
     
    6369        when "--xsd" 
    6470          xsd = arg 
    65         when "--classname" 
     71        when "--module_path" 
     72          opt['module_path'] = arg 
     73        when "--classdef", "--mapping_registry", "--mapper" 
    6674          opt[name.sub(/^--/, '')] = arg.empty? ? nil : arg 
    6775        when "--force"