Skip to content

Commit

Permalink
Fixed a namespace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jkichline committed Sep 16, 2012
1 parent 7075cc7 commit d1a543b
Show file tree
Hide file tree
Showing 4 changed files with 632 additions and 6 deletions.
12 changes: 10 additions & 2 deletions Website/php/assets/classes/converter.class.php
Expand Up @@ -249,6 +249,7 @@ public function SaveIndexToDirectory($document, $directory) {
* @return DOMDocument Returns the resulting XmlDocument
*/
public function Transform($document) {
global $_REQUEST;

// Create the XSLT
$xsl = $_SERVER['DOCUMENT_ROOT'] . '/assets/code/' . $this->Type() . '.xslt';
Expand Down Expand Up @@ -696,7 +697,11 @@ public static function GetStringFromUrl($path, $username = null, $password = nul
*/
public static function GetXmlDocumentFromUrl($path, $username = null, $password = null, $domain = null) {
$doc = new DOMDocument();
$doc->loadXML(WsdlFile::GetStringFromUrl($path, $username, $password, $domain));
try {
$doc->loadXML(WsdlFile::GetStringFromUrl($path, $username, $password, $domain));
} catch(Exception $ex) {
$doc = null;
}
return $doc;
}

Expand Down Expand Up @@ -730,6 +735,9 @@ private static function _expandImports($doc) {

$schemaImports = $xpath->query("//*/xsd:import");
$wsdlImports = $xpath->query("//*/wsdl:import");
if($importedUris == null) {
$importedUris = array();
}

// Expand the schema imports
foreach ($schemaImports as $importNode) {
Expand Down Expand Up @@ -772,7 +780,7 @@ private static function _expandImports($doc) {

// Recursively add nodes
if ($continueExpanding) {
WsdlFile::_expandImports(doc);
WsdlFile::_expandImports($doc);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions Website/php/assets/code/JavaScript.xslt
Expand Up @@ -41,9 +41,9 @@
<package>
<xsl:attribute name="class"><xsl:value-of select="$serviceName"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="$serviceName"/>.Javascript</xsl:attribute>
<folder copy="JavaScript/Source"/>
<folder copy="JavaScript/Documentation"/>
<folder copy="JavaScript/Examples"/>
<folder copy="Javascript/Source"/>
<folder copy="Javascript/Documentation"/>
<folder copy="Javascript/Examples"/>

<file>
<xsl:attribute name="filename">Examples/<xsl:value-of select="$serviceName"/>.html</xsl:attribute>&lt;html&gt;
Expand Down

0 comments on commit d1a543b

Please sign in to comment.