raml-typesystem
Advanced tools
Comparing version 0.0.87 to 0.0.88
@@ -771,4 +771,4 @@ "use strict"; | ||
var schema = elementChildrenByName(doc, 'schema', this.namspacePrefix)[0]; | ||
var imports = elementChildrenByName(schema, 'import', this.namspacePrefix); | ||
var includes = elementChildrenByName(schema, 'include', this.namspacePrefix); | ||
var imports = elementChildrenByNameIgnoringNamespace(schema, 'import'); | ||
var includes = elementChildrenByNameIgnoringNamespace(schema, 'include'); | ||
var refElements = imports.concat(includes); | ||
@@ -821,4 +821,4 @@ refElements.forEach(function (refElement) { | ||
var schema = elementChildrenByName(doc, 'schema', this.namspacePrefix)[0]; | ||
var imports = elementChildrenByName(schema, 'import', this.namspacePrefix); | ||
var includes = elementChildrenByName(schema, 'include', this.namspacePrefix); | ||
var imports = elementChildrenByNameIgnoringNamespace(schema, 'import'); | ||
var includes = elementChildrenByNameIgnoringNamespace(schema, 'include'); | ||
var refElements = imports.concat(includes); | ||
@@ -986,2 +986,13 @@ return Promise.all(refElements.map(function (refElement) { | ||
exports.createSchema = createSchema; | ||
function elementChildrenByNameIgnoringNamespace(parent, tagName) { | ||
var elements = parent.getElementsByTagNameNS("*", tagName); | ||
var result = []; | ||
for (var i = 0; i < elements.length; i++) { | ||
var child = elements[i]; | ||
if (child.parentNode === parent) { | ||
result.push(child); | ||
} | ||
} | ||
return result; | ||
} | ||
function elementChildrenByName(parent, tagName, ns) { | ||
@@ -988,0 +999,0 @@ if (ns == null) { |
{ | ||
"name": "raml-typesystem", | ||
"version": "0.0.87", | ||
"version": "0.0.88", | ||
"main": "dist/src/index.js", | ||
@@ -28,3 +28,3 @@ "scripts": { | ||
"raml-xml-validation": "0.0.14", | ||
"raml-json-validation": "0.0.16" | ||
"raml-json-validation": "0.0.17" | ||
}, | ||
@@ -31,0 +31,0 @@ "browser": { |
@@ -981,4 +981,4 @@ import {XMLSchemaReference} from "raml-xml-validation"; | ||
var imports: any[] = elementChildrenByName(schema, 'import', this.namspacePrefix); | ||
var includes: any[] = elementChildrenByName(schema, 'include', this.namspacePrefix); | ||
var imports: any[] = elementChildrenByNameIgnoringNamespace(schema, 'import'); | ||
var includes: any[] = elementChildrenByNameIgnoringNamespace(schema, 'include'); | ||
@@ -1054,4 +1054,4 @@ var refElements: any = imports.concat(includes); | ||
var imports: any[] = elementChildrenByName(schema, 'import', this.namspacePrefix); | ||
var includes: any[] = elementChildrenByName(schema, 'include', this.namspacePrefix); | ||
var imports: any[] = elementChildrenByNameIgnoringNamespace(schema, 'import'); | ||
var includes: any[] = elementChildrenByNameIgnoringNamespace(schema, 'include'); | ||
@@ -1262,2 +1262,20 @@ var refElements: any = imports.concat(includes); | ||
function elementChildrenByNameIgnoringNamespace(parent: any, tagName: string): any[] { | ||
var elements = parent.getElementsByTagNameNS("*", tagName); | ||
var result: any[] = []; | ||
for(var i: number = 0; i < elements.length; i++) { | ||
var child = elements[i]; | ||
if(child.parentNode === parent) { | ||
result.push(child); | ||
} | ||
} | ||
return result; | ||
} | ||
function elementChildrenByName(parent: any, tagName: string, ns:string): any[] { | ||
@@ -1264,0 +1282,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2092608
41817