[Xml-compile] Using xsi:type with XML::Compile
DEIGNAN Ciaran
c.deignan at rsd.com
Tue Aug 28 15:27:14 GMT 2012
Hi Mark,
> > > Easier:
> > > $wsdl->prefix(dt => 'http://www.rsd.com/2011/07/datatype/schema');
> > > xsi_type => { 'dt:FilePlanType' => 'dt:rmFilePlanType' }
> >
> > This doesn't work for me :(
> > It says :
> > error: unknown name prefix for `dt:rmFilePlanType'
> Weird. The order is important, of course. You may also say
> $wsdl->prefix(dt => 'http://www.rsd.com/2011/07/datatype/schema');
> $wsdl->xsiType('dt:FilePlanType' => 'dt:rmFilePlanType');
I can add print statements to the prefix() method in Cache.pm.
sub prefix($) { my $ret = $_[0]->{XCC_prefixes}{$_[1]}; print ">", Data::Dumper::Dumper($_[0]->{XCC_prefixes}); $ret;}
When I call " $wsdl->prefix(dt => 'http://www.rsd.com/2011/07/datatype/schema');" nothing is added to the structure.
I don't see how it could work, actually. The $_[1] is just the 'dt'? Is it used as an lvalue?
I tried to hack the function to exploit the $_[2] but then something breaks in XML/Compile/WSDL11.pm line 140.
Ciaran
More information about the Xml-compile
mailing list