UNC-Libraries / jquery.xmleditor

jQuery based XML editor plugin.
153 stars 71 forks source link

TypeError: Cannot read property 'namespaceUri' of null #99

Open d7gonzo opened 5 years ago

d7gonzo commented 5 years ago

I have been trying to utilize the complete TEI schema for editing documents. The exact file I downloaded from them is the XSD file labelled All.

The complete error that appears:

TypeError: Cannot read property 'namespaceUri' of null at SchemaProcessor.getBuiltInType (xsd2json.js:1073) at SchemaProcessor.build_restriction (xsd2json.js:998) at SchemaProcessor.build (xsd2json.js:761) at SchemaProcessor.build_simpleType (xsd2json.js:852) at SchemaProcessor.build (xsd2json.js:761) at SchemaProcessor.build_attribute (xsd2json.js:810) at SchemaProcessor.build (xsd2json.js:761) at SchemaProcessor.buildTopLevel (xsd2json.js:757) at SchemaProcessor.build_schema (xsd2json.js:741) at SchemaProcessor.processSchema (xsd2json.js:628)

The javascript function used from index.html:

    $(function() {
          var extractor = new Xsd2Json("tei_all.xsd", {"schemaURI":"schemas/tei/"});

          $("#mods_editor").xmlEditor({
                  schema: extractor.getSchema()
          });
    });

Also came across this exact error when trying to import a Menota schema I converted using the TEI Roma tool.

Screen Shot 2019-05-26 at 4 04 09 PM