Fix WSDL schema stylesheet including

This commit is contained in:
Rekky
2013-11-26 11:39:07 +04:00
committed by Francis Besset
parent 8788d7595d
commit 1e82d7fdd7
3 changed files with 15 additions and 1 deletions

View File

@ -69,6 +69,7 @@ class Dumper
'version12_class' => 'BeSimple\\SoapWsdl\\Dumper\\Version12',
'version11_name' => $this->definition->getName(),
'version12_name' => $this->definition->getName().'12',
'stylesheet' => null,
);
$invalid = array();
@ -123,6 +124,8 @@ class Dumper
$this->document->formatOutput = true;
$this->addStylesheet();
return $this->document->saveXML();
}
@ -297,6 +300,15 @@ class Dumper
return $operation;
}
protected function addStylesheet()
{
if ($this->options['stylesheet']) {
$stylesheet = $this->document->createProcessingInstruction('xml-stylesheet', sprintf('type="text/xsl" href="%s"', $this->options['stylesheet']));
$this->document->insertBefore($stylesheet, $this->document->documentElement);
}
}
protected function getVersion($version)
{
if (\SOAP_1_2 === $version) {