[Xml-compile] Accessing schemaLocation attribute url values inside <include> elements

Morad IGMIR migmir at alliancemca.com
Wed Jul 7 10:22:20 GMT 2010


Hello everyone, hi again Markov :)

Is there a method or clever hack to get a hold of 
The urls in the schemaLocation of include elements such as these ? 

<s:schema [...]>
	<s:include schemaLocation="http://someurl.com/somefile.xsd" />
</s:schema>

While I understand the policy of XML::Compile is to not apply any magic
Internet retrieving of the <include> and <import> specified urls, 
I still would like to apply it myself, as I'm the sole editor of those files
(hence I trust them to be safe).
But I don't want to have to specify urls everytime i call :

$wsdl->importDefinitions('http://foo.bar.biz/bar.xsd');

because that would make me edit a lot of files at every change.
I'd like to be able to do something like this :

$wsdl->importDefinitions( @{ $wsdl->{schema}{import}{schemaLocation} } );

Which would allow me to mind about the wsdl only, not urls inside code or
config files.
Are they lost somewhere in the %{ $wsdl->index() } hash ? I haven't seen
them there.


TL;DR: is there a hash key ? method ? something to access urls in the
schemaLocation attribute ?

Again, thank you for your time




More information about the Xml-compile mailing list