Skip to content

Failed to parse xsd #23

@klokoy

Description

@klokoy

When I try to parse the following xsd:

https://github.com/BuildingSMART/BCF-XML/blob/release_2_1/Schemas/visinfo.xsd

cxsd fails with the following stack:

TypeError: Cannot read property 'id' of undefined
    at ContextBase.copyNamespace (/Users/klokoy/projects/bcf/node_modules/cxml/dist/xml/ContextBase.js:33:49)
    at Object.exportNamespace (/Users/klokoy/projects/bcf/node_modules/cxsd/dist/xsd/Exporter.js:142:32)
    at /Users/klokoy/projects/bcf/node_modules/cxsd/dist/cli.js:40:35
    at tryCatcher (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/klokoy/projects/bcf/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

Is there a good way to figure out if the problem is with cxsd or the xsd itself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions