pleonex / atom-autocomplete-xml Goto Github PK
View Code? Open in Web Editor NEWAutcomplete XML package for Atom editor.
Home Page: https://atom.io/packages/autocomplete-xml
License: MIT License
Autcomplete XML package for Atom editor.
Home Page: https://atom.io/packages/autocomplete-xml
License: MIT License
I have defined some element and attribute independently in order to reuse them in different elements.
<xs:attribute name="id" type="xs:integer" />
<xs:attribute name="layoutWidth" type="xs:string" />
<xs:attribute name="layoutHeight" type="xs:string" />
<xs:element name="Image" type="xs:string" >
then ref them in element defination:
<xs:element name="Layout">
<xs:complexType>
<xs:sequence>
<xs:element ref="Image" />
</xs:sequence>
<xs:attribute ref="layoutWidth" use="required" />
<xs:attribute ref="layoutHeight" use="required" />
</xs:complexType>
</xs:element>
however, autocomplete-xml does not show attribute layoutWidth
and layoutHeight
, but the element Image
could be loaded.
And by the way, can you support case insensitive autocomplete?
In #46 we found that the plugin should support more than one round of post-processing to support more than one depth of linking.
Incorrect XPath if there is XML code between comments.
Atom Version: 1.3.0-beta6-235a1a5
System: linux 4.2.6-200.fc22.x86_64
Thrown From: autocomplete-xml package, v0.4.0
Uncaught TypeError: Cannot read property 'xsdChildren' of undefined
At /home/benito/Projects/autocomplete-xml/lib/xsd.coffee:64
TypeError: Cannot read property 'xsdChildren' of undefined
at Object.module.exports.findTypeFromTag (/home/benito/Projects/autocomplete-xml/lib/xsd.coffee:64:5)
at Object.module.exports.findTypeFromXPath (/home/benito/Projects/autocomplete-xml/lib/xsd.coffee:56:23)
at Object.module.exports.getChildren (/home/benito/Projects/autocomplete-xml/lib/xsd.coffee:37:13)
at Object.module.exports.getTagNameCompletions (/home/benito/Projects/autocomplete-xml/lib/provider.coffee:71:9)
at Object.module.exports.detectAndGetSuggestions (/home/benito/Projects/autocomplete-xml/lib/provider.coffee:48:8)
at Object.module.exports.getSuggestions (/home/benito/Projects/autocomplete-xml/lib/provider.coffee:39:8)
at /usr/local/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:286:56
at Array.forEach (native)
at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/usr/local/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:265:17)
at AutocompleteManager.getSuggestionsFromProviders (/usr/local/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
-6:54.3.0 window:toggle-dev-tools (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
2x -6:41.8.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-3:57.5.0 core:paste (atom-text-editor.editor.is-focused)
3x -3:54.1.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-1:35.2.0 core:copy (atom-text-editor.editor.is-focused)
-0:02.2.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
{
"core": {
"autoHideMenuBar": true,
"openEmptyEditorOnStart": false,
"themes": [
"atom-material-ui",
"idiomatic-dark-syntax"
],
"disabledPackages": [
"linter-gcc",
"git-diff-details"
]
}
}
# User
atom-material-ui, v0.8.0
autocomplete-clang, v0.8.8
autocomplete-emojis, v2.2.2
autocomplete-python, v0.10.6
autocomplete-xml, v0.4.0
docblockr, v0.7.3
file-icons, v1.6.12
git-log, v0.4.1
idiomatic-dark-syntax, v0.1.3
linter, v1.11.2
linter-alex, v1.6.0
linter-clang, v3.3.0
linter-pep8, v1.0.1
linter-xmllint, v1.1.0
minimap, v4.16.2
minimap-autohide, v0.10.1
minimap-bookmarks, v0.1.0
minimap-find-and-replace, v4.3.2
minimap-git-diff, v4.1.8
minimap-highlight-selected, v4.3.1
minimap-linter, v1.0.0
minimap-selection, v4.3.1
tag, v0.3.0
term3, v0.19.2
tool-bar, v0.1.9
tool-bar-almighty, v0.5.0
travis-ci-status, v0.18.0
# Dev
autocomplete-xml, v0.4.0
The include element in an XSD schema enables a specific schema to be broken down into multiple files. It would be nice to add support for it...
The XSD I'm trying to load is a w3.org standard for SCXML:
https://www.w3.org/2011/04/SCXML/scxml.xsd
[Enter steps to reproduce below:]
Atom Version: 1.7.2
System: Mac OS X 10.11.4
Thrown From: autocomplete-xml package, v0.8.3
Uncaught TypeError: Cannot read property 'length' of undefined
At events.js:141
TypeError: Cannot read property 'length' of undefined
at Object.module.exports.parse (/Users/leonidlezner/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:67:5)
at /Users/leonidlezner/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:44:45
at Parser.<anonymous> (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Object.onclosetag (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:640:35)
at emitNode (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:645:5)
at closeTag (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:905:7)
at Object.write (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:1449:13)
at Parser.exports.Parser.Parser.parseString (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.parseString (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/Users/leonidlezner/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.module.exports.parseFromString (/Users/leonidlezner/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.module.exports.parseFromString (/Users/leonidlezner/.atom/packages/autocomplete-xml/lib/xsd.coffee:50:15)
at /Users/leonidlezner/.atom/packages/autocomplete-xml/lib/xsd.coffee:44:45
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)
-0:58.5.0 core:paste (atom-text-editor.editor.is-focused)
-0:57.4.0 editor:newline (atom-text-editor.editor.is-focused)
-0:57 core:save (atom-text-editor.editor.is-focused)
-0:39.7.0 core:paste (atom-text-editor.editor.is-focused)
-0:39.2.0 editor:newline (atom-text-editor.editor.is-focused)
5x -0:37.9.0 core:backspace (atom-text-editor.editor.is-focused)
-0:28.3.0 core:save (atom-text-editor.editor.is-focused)
-0:09.4.0 core:paste (atom-text-editor.editor.is-focused)
-0:05.5.0 core:backspace (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"one-dark-ui",
"solarized-dark-syntax"
]
}
}
# User
Stylus, v3.0.0
atom-autocomplete-php, v0.18.7
autocomplete-python, v1.7.2
autocomplete-xml, v0.8.3
color-picker, v2.1.1
django-templates, v0.5.0
linter, v1.11.4
linter-xmllint, v1.3.4
pigments, v0.26.0
project-manager, v2.9.7
python-tools, v0.6.7
xml-tools, v0.2.1
# Dev
No dev packages
Would love if we could copy the xpath with a simple keyboard shortcut when a xml element is the current selection. It looks like you have most of the code required since it's displayed in the lower right.
My XML file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nap.geogratis.gc.ca/metadata/tools/schemas/metadata/can-cgsb-171.100-2009-a/gmd/gmd.xsd">
</gmd:MD_Metadata>
No errors are thrown. Please advise.
following root node:
<?xml version="1.0" encoding="utf-8"?>
<form xmlns="http://www.qookery.org/ns/Form"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/ergobyte/qookery/master/qookery/docs/form.xsd" >
Atom: 1.14.1 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3
Thrown From: autocomplete-xml package 0.9.4
Uncaught TypeError: Cannot read property 'xsdChildren' of undefined
At events.js:160
TypeError: Cannot read property 'xsdChildren' of undefined
at Object.postParsing (/packages/autocomplete-xml/lib/xsdParser.coffee:363:38)
at Object.parse (/packages/autocomplete-xml/lib/xsdParser.coffee:88:6)
at /packages/autocomplete-xml/lib/xsdParser.coffee:49:12
at /packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Object.onclosetag (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:640:35)
at emitNode (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:645:5)
at closeTag (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:905:7)
at Object.write (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:1449:13)
at Parser.exports.Parser.Parser.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.parseFromString (/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.parseFromString (/packages/autocomplete-xml/lib/xsd.coffee:59:15)
at /packages/autocomplete-xml/lib/xsd.coffee:30:12)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
-0:10.2.0 refactor:done (input.hidden-input)
-0:10.2.0 docblockr:parse-enter (input.hidden-input)
-0:10.2.0 editor:newline (input.hidden-input)
-0:09.5.0 refactor:done (input.hidden-input)
-0:09.5.0 docblockr:parse-enter (input.hidden-input)
-0:09.5.0 editor:newline (input.hidden-input)
api-docs 0.0.6
atom-beautify 0.29.17
autocomplete-xml 0.9.4
docblockr 0.9.1
js-refactor 0.7.5
jsdoc-generator 0.2.3
linter 1.11.21
linter-jshint 3.0.2
node-debugger 1.10.0
refactor 0.11.3
tag 0.4.0
If the attribute points to a defined type it will auto complete, if the enumeration is inline it will not.
Let me know if you need more data.
Thanks
<xs:attribute name="lang" type="curr" />
<xs:attribute name="orientation" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="vertical"/> <xs:enumeration value="horizontal"/> </xs:restriction> </xs:simpleType> </xs:attribute>
[Enter steps to reproduce below:]
Atom Version: 1.2.4
System: Ubuntu 14.04.3
Thrown From: autocomplete-xml package, v0.7.3
Failed to load the autocomplete-xml package
At Cannot find module 'uuid'
Error: Cannot find module 'uuid'
at Module._resolveFilename (module.js:336:15)
at Function.Module._resolveFilename (/usr/share/atom/resources/app.asar/src/module-cache.js:383:52)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/krishaweb/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:2:8)
at Object.<anonymous> (/home/krishaweb/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:1:1)
at Module._compile (module.js:434:26)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:190:21)
at Module.load (module.js:355:32)
{
"core": {
"themes": [
"one-light-ui",
"one-light-syntax"
],
"projectHome": "/var/www/",
"openEmptyEditorOnStart": false
}
}
# User
Remote-FTP, v0.7.14
autoclose-html, v0.19.0
autocomplete-xml, v0.7.3
drunken-php, v0.2.1
git-log, v0.4.1
# Dev
No dev packages
My XML looks like this:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="CDA.xsl"?>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:voc="urn:hl7-org:v3/voc" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/ppazos/cabolabs-cda/master/CDA_flat.xsd">
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040" />
<id root="412bdccb-1c18-4b43-8184-4b2210123455" />
...
When I try to type a tag, this error appears:
events.js:160
Hide Stack Trace
TypeError: Cannot read property '0' of undefined
at Object.getDocumentation (/home/pablo/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:114:5)
at Object.initTypeObject (/home/pablo/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:131:21)
at Object.parseType (/home/pablo/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:94:13)
at Object.parse (/home/pablo/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:76:6)
at /home/pablo/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:49:12
at Parser.<anonymous> (/home/pablo/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Object.onclosetag (/home/pablo/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/home/pablo/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:624:35)
at emitNode (/home/pablo/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:629:5)
at closeTag (/home/pablo/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:889:7)
at Object.write (/home/pablo/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/home/pablo/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.parseString (/home/pablo/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/home/pablo/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.parseFromString (/home/pablo/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.parseFromString (/home/pablo/.atom/packages/autocomplete-xml/lib/xsd.coffee:59:15)
at IncomingMessage.<anonymous> (/home/pablo/.atom/packages/autocomplete-xml/lib/xsd.coffee:30:12)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
The relative paths should be resolved from the current path of the XML file.
Atom Version: 1.3.0-beta6-235a1a5
System: linux 4.2.6-200.fc22.x86_64
Thrown From: autocomplete-xml package, v0.4.0
Uncaught TypeError: Cannot read property 'schema' of undefined
At /home/benito/Projects/autocomplete-xml/lib/xsdParser.coffee:37
TypeError: Cannot read property 'schema' of undefined
at Object.module.exports.parse (/home/benito/Projects/autocomplete-xml/lib/xsdParser.coffee:37:14)
at /home/benito/Projects/autocomplete-xml/lib/xsdParser.coffee:31:10
at Parser.<anonymous> (/home/benito/Projects/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:487:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Parser.exports.Parser.Parser.parseString (/home/benito/Projects/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:506:16)
at Parser.parseString (/home/benito/Projects/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/home/benito/Projects/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.module.exports.parseFromString (/home/benito/Projects/autocomplete-xml/lib/xsdParser.coffee:28:12)
at ReadFileContext.callback (/home/benito/Projects/autocomplete-xml/lib/xsd.coffee:31:19)
-0:14.1.0 window:toggle-dev-tools (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:01.5.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
{
"core": {
"autoHideMenuBar": true,
"openEmptyEditorOnStart": false,
"themes": [
"atom-material-ui",
"idiomatic-dark-syntax"
],
"disabledPackages": [
"linter-gcc",
"git-diff-details"
]
}
}
# User
atom-material-ui, v0.8.0
autocomplete-clang, v0.8.8
autocomplete-emojis, v2.2.2
autocomplete-python, v0.10.6
autocomplete-xml, v0.4.0
docblockr, v0.7.3
file-icons, v1.6.12
git-log, v0.4.1
idiomatic-dark-syntax, v0.1.3
linter, v1.11.2
linter-alex, v1.6.0
linter-clang, v3.3.0
linter-pep8, v1.0.1
linter-xmllint, v1.1.0
minimap, v4.16.2
minimap-autohide, v0.10.1
minimap-bookmarks, v0.1.0
minimap-find-and-replace, v4.3.2
minimap-git-diff, v4.1.8
minimap-highlight-selected, v4.3.1
minimap-linter, v1.0.0
minimap-selection, v4.3.1
tag, v0.3.0
term3, v0.19.2
tool-bar, v0.1.9
tool-bar-almighty, v0.5.0
travis-ci-status, v0.18.0
# Dev
autocomplete-xml, v0.4.0
It appears the plugin supports only /xsi:noNamespaceSchemaLocation attribute to reference XML schema. However the autocompletition does not work for an XML, which contains xsi:schemaLocation referencing an XSD with targetNamespace.
It would be nice to support namespaces in such a plugin like this.
Thanks.
Error occurs in xsdParser.coffee L79 on the following xml schema: https://www.w3.org/2011/04/SCXML/scxml.xsd
This line attempts to iterate through xml.element
, which is undefined.
Not sure if this has anything to do with #8, but i also tested the noNamespaceSchemaLocation and had the same error.
One thing that might be interesting is that the schemaLocation in the xml file is relative to the xml
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema.xsd">
...
</root>
Atom Version: 1.11.2
Electron Version: 0.37.8
System: Microsoft Windows 7 Enterprise
Thrown From: autocomplete-xml package, v0.9.3
Uncaught TypeError: Cannot read property 'xsdTypeName' of undefined
At events.js:154
TypeError: Cannot read property 'xsdTypeName' of undefined
at Object.module.exports.postParsing (file:///<user_home>/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:328:36)
at Object.module.exports.parse (file:///<user_home>/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:88:6)
at file:///<user_home>/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:49:12
at Parser.<anonymous> (<user_home>\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:483:18)
at emitOne (events.js:90:13)
at Parser.emit (events.js:182:7)
at Object.onclosetag (<user_home>\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:444:26)
at emit (<user_home>\.atom\packages\autocomplete-xml\node_modules\sax\lib\sax.js:640:35)
at emitNode (<user_home>\.atom\packages\autocomplete-xml\node_modules\sax\lib\sax.js:645:5)
at closeTag (<user_home>\.atom\packages\autocomplete-xml\node_modules\sax\lib\sax.js:905:7)
at Object.write (<user_home>\.atom\packages\autocomplete-xml\node_modules\sax\lib\sax.js:1449:13)
at Parser.exports.Parser.Parser.parseString (<user_home>\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:502:31)
at Parser.parseString (<user_home>\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:7:59)
at Object.exports.parseString (<user_home>\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:534:19)
at Object.module.exports.parseFromString (file:///<user_home>/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.module.exports.parseFromString (file:///<user_home>/.atom/packages/autocomplete-xml/lib/xsd.coffee:58:15)
at file:///<user_home>/.atom/packages/autocomplete-xml/lib/xsd.coffee:52:12
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)
{
"core": {
"telemetryConsent": "no"
}
}
# User
autocomplete-xml, v0.9.3 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.2.0 (inactive)
base16-tomorrow-light-theme, v1.2.0 (inactive)
one-dark-ui, v1.6.0 (active)
one-light-ui, v1.6.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.7.0 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.201.1 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.59.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v1.0.0 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2-hotfix1 (active)
snippets, v1.0.2 (active)
spell-check, v0.68.2 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.101.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.209.3 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)
# Dev
No dev packages
[Enter steps to reproduce:]
Atom: 1.22.1 ia32
Electron: 1.6.15
OS: Unknown Windows version
Thrown From: autocomplete-xml package 0.9.4
Uncaught Error: Cannot find module 'xml2js'
At C:\Users\Mrr\AppData\Local\atom\app-1.22.1\resources\app\static\<embedded>:1
Error: Cannot find module 'xml2js'
at Module._resolveFilename (module.js:470:15)
at Module._resolveFilename (~/AppData/Local/atom/app-1.22.1/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.22.1/resources/app/src/module-cache.js:354:58)
at Module.require (/app.asar/static/index.js:40:43)
at require (~/AppData/Local/atom/app-1.22.1/resources/app/src/native-compile-cache.js:66:33)
at Object.parseFromString (/packages/atom-autocomplete-xml-0.9.4/lib/xsdParser.coffee:38:14)
at Object.parseFromString (/packages/atom-autocomplete-xml-0.9.4/lib/xsd.coffee:59:15)
at /packages/atom-autocomplete-xml-0.9.4/lib/xsd.coffee:53:12
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:416:3)
2x -7:40.2.0 core:save (input.hidden-input)
-4:03.7.0 editor:move-to-end-of-screen-line (input.hidden-input)
25x -4:03.5.0 core:page-down (input.hidden-input)
3x -1:25.8.0 core:delete (input.hidden-input)
-0:57.8.0 core:move-left (input.hidden-input)
-0:56.2.0 core:move-right (input.hidden-input)
-0:55.7.0 core:delete (input.hidden-input)
-0:45.5.0 core:copy (input.hidden-input)
-0:43.3.0 core:paste (input.hidden-input)
-0:10.2.0 editor:select-to-first-character-of-line (input.hidden-input)
2x -0:09.7.0 core:copy (input.hidden-input)
-0:08.5.0 editor:move-to-end-of-screen-line (input.hidden-input)
-0:08.2.0 editor:newline (input.hidden-input)
-0:07.9.0 core:paste (input.hidden-input)
-0:05.9.0 editor:newline (input.hidden-input)
-0:05.9.0 core:paste (input.hidden-input)
autocomplete-xml 0.9.4
Argument to path.dirname
must be a string
Object.dirname (/Applications/Atom.app/Contents/Resources/app.asar/src/electron-shims.js:9:10)
Object.load (/Users/thomas/.atom/packages/autocomplete-xml/lib/xsd.coffee:43:27)
<unknown> (/Users/thomas/.atom/packages/autocomplete-xml/lib/provider.coffee:32:24)
Object.getSuggestions (/Users/thomas/.atom/packages/autocomplete-xml/lib/provider.coffee:30:16)
providers.forEach.provider (<embedded>:42458:58)
Array.forEach (native)
In a XSD with complex type that references multiple groups like this:
<xs:group name="g1">
<xs:sequence>
<xs:element name="a" type="xs:string"/>
</xs:sequence>
</xs:group>
<xs:group name="g2">
<xs:sequence>
<xs:element name="b" type="xs:string"/>
</xs:sequence>
</xs:group>
<xs:complexType name="myType">
<xs:sequence>
<xs:group ref="g1"/>
<xs:group ref="g2"/>
</xs:sequence>
</xs:complexType>
only the first group g1
is resolved for myType
. So the autocompletion suggests only a
tag and not the b
tag.
I have a simple fix for this but I'm not sure how to create a pull request. So I boldly offer the code here. The following code is to replace the block of code starting at line 357 of xsdParser.coffee:
# Resolve all groups in type
newChildren = []
for group in type.xsdChildren
if group.childType is 'group'
linkType = @types[group.ref]
newChildren = newChildren.concat(linkType.xsdChildren)
else
newChildren = newChildren.concat([group])
type.xsdChildren = newChildren
Would you please review the code and consider fixing your package?
Thanks
It makes no sense to force the name of the namespace for http://www.w3.org/2001/XMLSchema to be xs
... There are xsd schema made by w3.org that don't use this definition and are ignored by the package. For example, https://www.w3.org/2011/04/SCXML/scxml.xsd
[Enter steps to reproduce:]
Atom: 1.37.0 x64
Electron: 2.0.18
OS: Mac OS X 10.14.5
Thrown From: autocomplete-xml package 0.11.0
Failed to activate the autocomplete-xml package
At Arguments to CompositeDisposable.add must have a .dispose() method
TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
at assertDisposable (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1177836)
at CompositeDisposable.add (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1178804)
at Object.consumeProvider (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:161810)
at Object.consumeProvider_2 (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:161508)
at Provider.t.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1040977)
at ServiceHub.t.exports.ServiceHub.provide (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3416238)
at Package.activateServices (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3424424)
at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3421479)
at measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3420803)
at Package.measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3418434)
at activationPromise.activationPromise.Promise (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3420663)
at new Promise (<anonymous>)
at Package.activate (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3420606)
at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:382562)
at o.forEach.e (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:377796)
at Array.forEach (<anonymous>)
at disabledPackagesSubscription.disabledPackagesSubscription.config.onDidChange (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:377780)
at emitter.on (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:335285)
at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1174290)
at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1175731)
at Config.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:337773)
at Config.setRawValue (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:335013)
at Config.set (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:330807)
at Config.removeAtKeyPath (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:332830)
at Package.enable (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3418219)
at PackageManager.enablePackage (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:375494)
at HTMLButtonElement.enablementButtonClickHandler (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:3056058)
-7:48.5.0 core:paste (input.hidden-input)
8x -1:32.3.0 core:backspace (input.hidden-input)
2x -1:22.1.0 core:move-down (input.hidden-input)
-1:21.6.0 autocomplete-plus:confirm (input.hidden-input)
2x -1:20.5.0 editor:newline (input.hidden-input)
23x -1:15.8.0 core:backspace (input.hidden-input)
-0:18.2.0 core:save (input.hidden-input)
autocomplete-xml 0.11.0
busy-signal 2.0.1
custom-xml-autocomplete 0.1.0
intentions 1.1.5
language-dtd 0.2.1
linter 2.3.0
linter-autocomplete-jing 0.8.4
linter-ui-default 1.7.1
linter-xmllint 1.4.4
teletype 0.13.4
xml-tools 0.2.1
Support for xsi:type and extending types in xml
<xs:complexType name="Animal">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
<xs:attribute name="animalClass" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="LandAnimal">
<xs:complexContent>
<xs:extension base="Animal">
<xs:sequence>
<xs:element name="diet" type="xs:string"/>
</xs:sequence>
<xs:attribute name="diet" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
The plugin should be able to handle the built-in types so some features like list and extension can found them.
If one clicks on the first attribute, the xpath calculation is incorrect.
Ex:
<OrderHeader>
<TsetPurposeCode>00</TsetPurposeCode>
<PurchaseOrderDate>2016-05-09</PurchaseOrderDate>
</OrderHeader>
Click the 'e' in PurchaseOrderDate and view the path in the lower right is: OrderHeader/Purchase
Correct path should be OrderHeader/PurchaseOrderDate
Show a side window with the current XPath and the XML children.
This occurred as soon as a non white character was entered into the xml file,
for example
return
<
causes it to fail..
The xsd is visible as the verifier (atom-xmlvalidate package) works correctly.
TypeError: Cannot read property 'memberTypes' of undefined
at Object.parseSimpleType (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:149:39)
at Object.parseType (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:100:8)
at Object.parseAnonElements (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:237:6)
at Object.parseElement (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:252:28)
at Object.parseChildrenGroups (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:226:56)
at Object.parseComplexType (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:198:11)
at Object.parseType (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:102:8)
at Object.parse (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:76:6)
at /Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:49:12
at Parser. (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Object.onclosetag (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:624:35)
at emitNode (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:629:5)
at closeTag (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:889:7)
at Object.write (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.parseString (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/Users/counciller/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.parseFromString (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.parseFromString (/Users/counciller/.atom/packages/autocomplete-xml/lib/xsd.coffee:59:15)
at /Users/counciller/.atom/packages/autocomplete-xml/lib/xsd.coffee:53:12
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
I downloaded a mondrian4.xsd file from here and created a mondrian4-gasper.xml with the following content:
<?xml version="1.0" encoding="UTF-8" ?> <Schema xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="file:////Users/utente2/Projects/IGEST/mondrian/mondrian4.xsd"> </Schema>
If I try to type <Phy
inside Schema
i get no suggestion. I am hoping to receive PhysicalSchema.
What I am doing wrong?
Consider that inside a browser I can see file:////Users/utente2/Projects/IGEST/mondrian/mondrian4.xsd .
Please help me.
Atom 1.5.3
autocomplete-xml 0.8.2
Mac OSX El capitan
Assumption is made in the xsdParser that a xs:complexType will always have children elements.
[Enter steps to reproduce:]
Atom: 1.30.0 x64
Electron: 2.0.5
OS: Microsoft Windows 10 Enterprise N
Thrown From: autocomplete-xml package 0.10.1
Uncaught TypeError: linkType.xsdChildren.concat is not a function
At events.js:183
TypeError: linkType.xsdChildren.concat is not a function
at Object.postParsing (/packages/autocomplete-xml/lib/xsdParser.coffee:398:49)
at Object.parse (/packages/autocomplete-xml/lib/xsdParser.coffee:88:6)
at /packages/autocomplete-xml/lib/xsdParser.coffee:49:12
at /packages/autocomplete-xml/node_modules/xml2js/lib/parser.js:303:18)
at emitOne (events.js:116:13)
at Parser.emit (events.js:211:7)
at SAXParser.onclosetag (/packages/autocomplete-xml/node_modules/xml2js/lib/parser.js:261:26)
at emit (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:624:35)
at emitNode (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:629:5)
at closeTag (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:889:7)
at SAXParser.write (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/parser.js:322:31)
at Parser.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/parser.js:5:59)
at Object.exports.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/parser.js:354:19)
at Object.parseFromString (/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.parseFromString (/packages/autocomplete-xml/lib/xsd.coffee:59:15)
at /packages/autocomplete-xml/lib/xsd.coffee:53:12
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
-2:15.9.0 core:backspace (input.hidden-input)
autocomplete-xml 0.10.1
I get this error from an XSD I created, see https://gist.githubusercontent.com/nalt/dfa2abc9d2e3ae4feb82ca5608090387/raw/9c26b8389314d4891fa9958759746e49ffd22602/roslaunch.xsd . It occurs as soon as I type anything in the corresponding XML.
With this URL, it should be easy to reproduce. I can provide a stack trace, if it helps.
[Enter steps to reproduce below:]
Atom Version: 1.5.4
System: Ubuntu 14.04.2
Thrown From: autocomplete-xml package, v0.8.2
Uncaught TypeError: Cannot read property '$' of null
At events.js:141
TypeError: Cannot read property '$' of null
at Object.module.exports.initTypeObject (/home/tor/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:110:20)
at Object.module.exports.parseRoot (/home/tor/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:285:13)
at Object.module.exports.parse (/home/tor/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:66:6)
at /home/tor/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:44:45
at Parser.<anonymous> (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Object.onclosetag (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:639:35)
at emitNode (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:644:5)
at closeTag (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:903:7)
at Object.write (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:1447:13)
at Parser.exports.Parser.Parser.parseString (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.parseString (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/home/tor/.atom/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.module.exports.parseFromString (/home/tor/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.module.exports.parseFromString (/home/tor/.atom/packages/autocomplete-xml/lib/xsd.coffee:50:15)
at IncomingMessage.<anonymous> (/home/tor/.atom/packages/autocomplete-xml/lib/xsd.coffee:30:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:441:9)
at process._tickCallback (node.js:355:17)
-4:10.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-3:53 git-plus:menu (atom-text-editor.editor.is-focused)
6x -3:50.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)
2x -3:47.3.0 core:move-down (atom-text-editor.editor.mini.is-focused)
-3:46.3.0 core:move-up (atom-text-editor.editor.mini.is-focused)
-3:46 core:confirm (atom-text-editor.editor.mini.is-focused)
-1:14 editor:newline (atom-text-editor.editor.is-focused)
-0:48.7.0 core:backspace (atom-text-editor.editor.is-focused)
29x -0:42.9.0 core:undo (atom-text-editor.editor.is-focused)
3x -0:40.8.0 core:save (atom-text-editor.editor.is-focused)
-0:37.7.0 symbols-view:toggle-project-symbols (atom-text-editor.editor.is-focused)
2x -0:35.3.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:29.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)
10x -0:25.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:06.6.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
3x -0:03.6.0 core:backspace (atom-text-editor.editor.mini.is-focused)
{
"core": {}
}
# User
autocomplete-xml, v0.8.2
git-plus, v5.13.0
# Dev
No dev packages
[Enter steps to reproduce:]
Atom: 1.16.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.4
Thrown From: autocomplete-xml package 0.9.4
Uncaught TypeError: Cannot read property 'xsdChildren' of undefined
At events.js:160
TypeError: Cannot read property 'xsdChildren' of undefined
at Object.postParsing (/packages/autocomplete-xml/lib/xsdParser.coffee:363:38)
at Object.parse (/packages/autocomplete-xml/lib/xsdParser.coffee:88:6)
at /packages/autocomplete-xml/lib/xsdParser.coffee:49:12
at /packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Object.onclosetag (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:640:35)
at emitNode (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:645:5)
at closeTag (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:905:7)
at Object.write (/packages/autocomplete-xml/node_modules/sax/lib/sax.js:1452:13)
at Parser.exports.Parser.Parser.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/packages/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.parseFromString (/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.parseFromString (/packages/autocomplete-xml/lib/xsd.coffee:59:15)
at /packages/autocomplete-xml/lib/xsd.coffee:53:12
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
3x -3:39.5.0 core:move-right (input.hidden-input)
10x -3:37.9.0 core:backspace (input.hidden-input)
5x -3:28.5.0 core:move-right (input.hidden-input)
3x -3:27.5.0 core:select-right (input.hidden-input)
6x -3:25.7.0 core:backspace (input.hidden-input)
-3:22.7.0 core:save (input.hidden-input)
-1:49.9.0 core:copy (input.hidden-input)
-1:48.4.0 refactor:done (input.hidden-input)
-1:48.4.0 docblockr:parse-enter (input.hidden-input)
-1:48.4.0 editor:newline (input.hidden-input)
-1:47.9.0 editor:move-to-first-character-of-line (input.hidden-input)
-1:47.5.0 core:paste (input.hidden-input)
3x -1:41.3.0 core:move-left (input.hidden-input)
7x -1:40.7.0 core:select-right (input.hidden-input)
-0:14 core:move-right (input.hidden-input)
7x -0:13.4.0 core:select-left (input.hidden-input)
api-docs 0.0.6
atom-beautify 0.29.23
atom-lupa 0.7.35
atom-ternjs 0.18.2
autocomplete-xml 0.9.4
busy-signal 1.4.1
docblockr 0.9.4
intentions 1.1.2
js-refactor 0.7.5
linter 2.1.4
linter-eslint 8.1.7
linter-ui-default 1.2.3
node-debugger 1.10.1
refactor 0.11.4
tag 0.5.0
XSD Parser fails to get the root node information from this XSD. There are two issues to be fixed here:
Atom Version: 1.3.0-beta6-235a1a5
System: "Fedora release
Thrown From: autocomplete-xml package, v0.7.1
Uncaught TypeError: Cannot read property '0' of undefined
At events.js:141
TypeError: Cannot read property '0' of undefined
at Object.module.exports.parse (/lab/autocomplete-xml/lib/xsdParser.coffee:52:32)
at /lab/autocomplete-xml/lib/xsdParser.coffee:42:10
at Parser.<anonymous> (/lab/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:483:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Object.onclosetag (/lab/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:444:26)
at emit (/lab/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:639:35)
at emitNode (/lab/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:644:5)
at closeTag (/lab/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:903:7)
at Object.write (/lab/autocomplete-xml/node_modules/xml2js/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/lab/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:502:31)
at Parser.bind [as parseString] (/lab/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:7:59)
at Object.exports.parseString (/lab/autocomplete-xml/node_modules/xml2js/lib/xml2js.js:534:19)
at Object.module.exports.parseFromString (/lab/autocomplete-xml/lib/xsdParser.coffee:38:12)
at Object.module.exports.parseFromString (/lab/autocomplete-xml/lib/xsd.coffee:53:15)
at IncomingMessage.<anonymous> (/lab/autocomplete-xml/lib/xsd.coffee:34:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:441:9)
at process._tickCallback (node.js:355:17)
-3:27 core:move-up (atom-text-editor.editor.is-focused)
3x -3:26.2.0 core:backspace (atom-text-editor.editor.is-focused)
-3:23.2.0 core:save (atom-text-editor.editor.is-focused)
-3:16.6.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-2:50.3.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-2:50.3.0 editor:newline (atom-text-editor.editor.is-focused)
-2:50.2.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-2:50.2.0 editor:newline (atom-text-editor.editor.is-focused)
2x -2:50 core:move-up (atom-text-editor.editor.is-focused)
-2:47 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-2:47 editor:newline (atom-text-editor.editor.is-focused)
-2:38.9.0 core:save (atom-text-editor.editor.is-focused)
-2:17.9.0 git-plus:add-all-and-commit (atom-text-editor.editor.is-focused)
-1:25.9.0 core:move-left (atom-text-editor.editor.is-focused)
-1:22.3.0 core:save (atom-text-editor.editor.is-focused)
2x -0:19.8.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"linter-python-pep8",
"spell-check",
"markdown-toc",
"linter-python-pep257",
"minimap-autohide",
"hyperclick",
"line-ending-converter"
],
"autoHideMenuBar": true,
"themes": [
"seti-ui",
"seti-syntax"
]
},
"autocomplete-xml": {}
}
# User
advanced-open-file, vundefined
atom-yeoman, v0.3.15
autocomplete-clang, v0.8.8
autocomplete-emojis, v2.2.2
autocomplete-python, v0.10.7
autocomplete-xml, v0.7.1
docblockr, v0.7.3
editor-stats, v0.17.0
file-icons, v1.6.13
git-log, v0.4.1
git-plus, v5.6.6
hex, v0.6.2
highlight-selected, v0.11.1
json-schema, v0.1.15
language-arduino, v0.4.1
language-arm, v1.2.0
language-latex, v0.6.1
linter, v1.11.3
linter-clang, v3.3.0
linter-coffeelint, v1.1.2
linter-pep8, v1.0.1
minimap, v4.16.2
minimap-bookmarks, v0.1.0
minimap-find-and-replace, v4.3.2
minimap-git-diff, v4.1.8
minimap-highlight-selected, v4.3.1
minimap-linter, v1.0.0
minimap-selection, v4.3.1
omnisharp-atom, v0.25.10
pdf-view, v0.37.0
project-manager, v2.6.5
rest-client, v0.5.0
seti-syntax, v0.4.1
seti-ui, v0.8.1
term3, v0.19.2
tool-bar, v0.1.9
tool-bar-almighty, v0.5.0
yuno-commit, v0.3.1
# Dev
No dev packages
I want to use atom-autocomplete-xml for editing XML files that contain snippets of HTML code wrapped in <![CDATA[...]]>
blocks, like in the following:
...
<text>
<![CDATA[
<h1>blah blah</h1>
<br><br>
blah blah
]]>
</text>
...
I would expect that autocompletion should not work when editing the contents of a CDATA block and that, more importantly, the contents of CDATA block should not be interpreted as XML structure. The behavior I am observing is that neither of the above conditioned is fullfilled. Specifically:
<br><br>
line above, after typing </
autocompletion will suggest </br>
, then again </br>
and finally </text>
.<
. Moreover, in the status line at the bottom of the atom window, the current path within the XML structure is printed including all the unclosed tags from all the preceding CDATA blocks, e.g. .../br/br
.Hello
I'm experiencing a strange issue where the XSD located at [1] refuses to load (for an example XML, see also [2]).
I discovered that I can get it to work by downloading it first and then using a local path, but it refuses to load with the remote URL.
Doing a bit of debugging, it seems that the body received from the download is an empty string [3], though there are no related errors in the developer tools or visible anywhere. The XSD parsing then goes on to complain that it can't parse the file (because it is empty).
(There is also an issue getting full autocompletion to work with this file, but I've posted that in #8 already.)
Thanks in advance
[1] https://raw.githubusercontent.com/doctrine/doctrine2/master/doctrine-mapping.xsd
[2] http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/xml-mapping.html#example
[3] https://github.com/pleonex/atom-autocomplete-xml/blob/master/lib/xsd.coffee#L30
I can't seem to get this package to work. I've tried with 1.0.34. I've uninstalled 1.0.34 and reinstalled. I've tried 1.0.35-beta0.
Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
at Function.Module._resolveLookupPaths (module.js:351:15)
at Module._resolveFilename (module.js:537:20)
at Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:154667)
at Module.require (file:///Applications/Atom%20Beta.app/Contents/Resources/app.asar/static/index.js:40:43)
at require (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:145974)
at Object.load (/Users/deanen1/.atom/packages/autocomplete-xml/lib/xsd.coffee:17:18)
at /Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:35:13
at new Promise ()
at Object.getSuggestions (/Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:34:7)
at n.forEach.t (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:631266)
at Array.forEach ()
at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630782)
at AutocompleteManager.findSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630520)
at AutocompleteManager.requestNewSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:639053)
at AutocompleteManager.showOrHideSuggestionListForBufferChanges (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:640144)
at Function.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1172197)
at Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1173638)
at TextBuffer.emitDidChangeTextEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:504122)
at TextBuffer.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:492297)
at TextEditor.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:24215)
at mergeIntersectingSelections (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:16150)
at TextEditor.mergeSelections (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:39529)
at TextEditor.mergeIntersectingSelections (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:39038)
at TextEditor.mutateSelectedText (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:16113)
at TextEditor.insertText (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:15662)
at TextEditor.e.(anonymous function) [as insertText] (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:259365)
at TextEditorComponent.didTextInput (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:93878)
module.js:351 Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
at Function.Module._resolveLookupPaths (module.js:351:15)
at Module._resolveFilename (module.js:537:20)
at Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:154667)
at Module.require (file:///Applications/Atom%20Beta.app/Contents/Resources/app.asar/static/index.js:40:43)
at require (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:145974)
at Object.load (/Users/deanen1/.atom/packages/autocomplete-xml/lib/xsd.coffee:17:18)
at /Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:35:13
at new Promise ()
at Object.getSuggestions (/Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:34:7)
at n.forEach.t (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:631266)
at Array.forEach ()
at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630782)
at AutocompleteManager.findSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630520)
at AutocompleteManager.requestNewSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:639053)
at AutocompleteManager.showOrHideSuggestionListForBufferChanges (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:640144)
at Function.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1172197)
at Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1173638)
at TextBuffer.emitDidChangeTextEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:504122)
at TextBuffer.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:492297)
at TextEditor.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:24215)
at AutocompleteView.module.exports.AutocompleteView.replaceSelectedTextWithMatch (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:138:13)
at AutocompleteView.module.exports.AutocompleteView.selectItemView (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:48:8)
at AutocompleteView.module.exports.SelectListView.populateList (/Users/deanen1/.atom/packages/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:210:21)
at AutocompleteView.module.exports.AutocompleteView.populateList (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:196:5)
at AutocompleteView.module.exports.SelectListView.setItems (/Users/deanen1/.atom/packages/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:167:12)
at AutocompleteView.module.exports.AutocompleteView.attach (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:107:6)
at AutocompleteView.module.exports.AutocompleteView.toggle (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:122:8)
at HTMLElement.autocomplete:toggle (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete.coffee:33:36)
at CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:350017)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1212824)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1208958)
at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:285196)
module.js:351 Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
at Function.Module._resolveLookupPaths (module.js:351:15)
at Module._resolveFilename (module.js:537:20)
at Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:154667)
at Module.require (file:///Applications/Atom%20Beta.app/Contents/Resources/app.asar/static/index.js:40:43)
at require (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:145974)
at Object.load (/Users/deanen1/.atom/packages/autocomplete-xml/lib/xsd.coffee:17:18)
at /Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:35:13
at new Promise ()
at Object.getSuggestions (/Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:34:7)
at n.forEach.t (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:631266)
at Array.forEach ()
at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630782)
at AutocompleteManager.findSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630520)
at AutocompleteManager.requestNewSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:639053)
at AutocompleteManager.showOrHideSuggestionListForBufferChanges (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:640144)
at Function.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1172197)
at Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1173638)
at TextBuffer.emitDidChangeTextEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:504122)
at TextBuffer.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:492297)
at TextEditor.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:24215)
at AutocompleteView.module.exports.AutocompleteView.replaceSelectedTextWithMatch (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:138:13)
at AutocompleteView.module.exports.AutocompleteView.confirmed (/Users/deanen1/.atom/packages/autocomplete/lib/autocomplete-view.coffee:81:6)
at AutocompleteView.module.exports.SelectListView.confirmSelection (/Users/deanen1/.atom/packages/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at HTMLDivElement.atom.commands.add.core:confirm (/Users/deanen1/.atom/packages/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.handleCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:350017)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1212824)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1208958)
at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:285196)
module.js:351 Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
at Function.Module._resolveLookupPaths (module.js:351:15)
at Module._resolveFilename (module.js:537:20)
at Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:154667)
at Module.require (file:///Applications/Atom%20Beta.app/Contents/Resources/app.asar/static/index.js:40:43)
at require (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:145974)
at Object.load (/Users/deanen1/.atom/packages/autocomplete-xml/lib/xsd.coffee:17:18)
at /Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:35:13
at new Promise ()
at Object.getSuggestions (/Users/deanen1/.atom/packages/autocomplete-xml/lib/provider.coffee:34:7)
at n.forEach.t (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:631266)
at Array.forEach ()
at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630782)
at AutocompleteManager.findSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:630520)
at AutocompleteManager.requestNewSuggestions (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:639053)
at AutocompleteManager.showOrHideSuggestionListForBufferChanges (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:640144)
at Function.simpleDispatch (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1172197)
at Emitter.emit (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:1173638)
at TextBuffer.emitDidChangeTextEvent (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:504122)
at TextBuffer.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:492297)
at TextEditor.transact (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:24215)
at mergeIntersectingSelections (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:16150)
at TextEditor.mergeSelections (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:39529)
at TextEditor.mergeIntersectingSelections (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:39038)
at TextEditor.mutateSelectedText (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:16113)
at TextEditor.insertText (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:15662)
at TextEditor.e.(anonymous function) [as insertText] (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:259365)
at TextEditorComponent.didTextInput (/Applications/Atom Beta.app/Contents/Resources/app/static/:11:93878)
Hi there,
I just wanted to use the autocomplete-xml feature to modify a custom XML file based on a suppliers XSD. The XSD is defined in the header and is valid. However, whenever I try to add a tag nothing is suggested. From time to time I get an error, saying, that some base types are not found. The XSD resides in the same directory as the XML, so I added nothing trailing to the XSD-definition, just left it product.xsd.
I investigated the file and also the XSD with XML Copy Editor, there it's working perfectly. Any hints on how I can debug why autocomplete struggles with this?
Regards, Thomas
This exception occurs, when I try to edit Propel ORM schema file like:
<?xml version="1.0" encoding="utf-8"?>
<database name="bo" namespace="TT\BO\DB" defaultIdMethod="native" defaultPhpNamingMethod="underscore" tablePrefix="bo_" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/propelorm/Propel/master/generator/resources/xsd/database.xsd" >
<!-- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/propelorm/Propel/master/generator/resources/xsd/database.xsd" -->
<!-- https://raw.githubusercontent.com/propelorm/Propel/master/generator/resources/xsd/ -->
<table name="user">
<column name="id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true" />
<column name="name" type="VARCHAR" size="255" required="true" defaultValue="" />
<column name="token" type="VARCHAR" size="255" required="true"/>
<column name="rank" type="INTEGER" required="true"/>
<column name="army" type="LONGVARCHAR" />
<unique name="ix_user_token">
<unique-column name="token"/>
</unique>
<unique name="ix_user_rank">
<unique-column name="rank"/>
</unique>
</table>
<table name="duel">
<column name="id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true" />
<column name="userId" type="INTEGER" required="true"/>
<column name="finished" type="BOOLEAN" required="true" />
<column name="expiresOn" type="TIMESTAMP" required="true" />
<column name="enemies" type="ARRAY" required="true" />
<unique name="ix_duel_userId">
<unique-column name="userId"/>
</unique>
<foreign-key foreignTable="user" name="fk_duel_user" skipSql="true">
<reference local="userId" foreign="id" />
</foreign-key>
</table>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB" />
<parameter name="Charset" value="utf8" />
<parameter name="Collate" value="utf8_general_ci" />
</vendor>
</database>
Atom Version: 1.2.4
System: Microsoft Windows 8.1 Pro
Thrown From: autocomplete-xml package, v0.7.1
Uncaught TypeError: Cannot read property 'schema' of undefined
At /C:/Users/Dmitriy/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:20
TypeError: Cannot read property 'schema' of undefined
at Object.module.exports.parse (file:///C:/Users/Dmitriy/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:47:14)
at file:///C:/Users/Dmitriy/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:41:10
at Parser.<anonymous> (C:\Users\Dmitriy\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:487:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Parser.exports.Parser.Parser.parseString (C:\Users\Dmitriy\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:506:16)
at Parser.parseString (C:\Users\Dmitriy\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:7:59)
at Object.exports.parseString (C:\Users\Dmitriy\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:534:19)
at Object.module.exports.parseFromString (file:///C:/Users/Dmitriy/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:38:12)
at ReadFileContext.callback (file:///C:/Users/Dmitriy/.atom/packages/autocomplete-xml/lib/xsd.coffee:38:19)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:303:13)
-1:24.8.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
-1:24.1.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
-1:23.6.0 core:move-left (atom-text-editor.editor.is-focused)
2x -1:23 core:backspace (atom-text-editor.editor.is-focused)
undefined -1:21.7.0 core:move-left (atom-text-editor.editor.is-focused)
6x -1:12.4.0 core:move-right (atom-text-editor.editor.is-focused)
-1:11.4.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
-1:10.6.0 core:move-down (atom-text-editor.editor.is-focused)
-1:09.8.0 core:save (atom-text-editor.editor.is-focused)
-0:57.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:35.5.0 core:backspace (div.panels)
5x -0:10.2.0 core:move-up (atom-text-editor.editor.is-focused)
-0:09.1.0 core:move-down (atom-text-editor.editor.is-focused)
-0:08.8.0 docblockr:parse-enter (atom-text-editor.editor.is-focused)
-0:08.8.0 editor:newline (atom-text-editor.editor.is-focused)
-0:06.9.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
{
"core": {}
}
# User
atom-autocomplete-php, v0.18.1
autocomplete-xml, v0.7.1
docblockr, v0.7.3
editorconfig, v1.2.2
file-icons, v1.6.12
file-types, v0.5.1
go-plus, v3.5.2
go-rename, v0.3.0
linter, v1.11.3
node-debugger, vundefined
nuclide-file-watcher, v0.0.35
php-cs-fixer, v2.5.1
terminal-plus, v0.14.5
# Dev
No dev packages
[Enter steps to reproduce:]
Atom: 1.21.1 x64
Electron: 1.6.15
OS: Microsoft Windows 10 Enterprise
Thrown From: autocomplete-xml package 0.9.4
Uncaught TypeError: Cannot read property 'slice' of undefined
At C:\Users\********\.atom\packages\autocomplete-xml\lib\xml-utils.coffee:27
TypeError: Cannot read property 'slice' of undefined
at Object.getXPathCompleteWord (/packages/autocomplete-xml/lib/xml-utils.coffee:27:34)
at HTMLElement.XPathStatusBarView.updateXPath (/packages/autocomplete-xml/lib/xpath-statusbar-view.coffee:95:21)
at HTMLElement.XPathStatusBarView.subscribeToActiveTextEditor (/packages/autocomplete-xml/lib/xpath-statusbar-view.coffee:83:8)
at /packages/autocomplete-xml/lib/xpath-statusbar-view.coffee:45:8
at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.21.1/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.21.1/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at Workspace.didChangeActivePaneItemOnPaneContainer (~/AppData/Local/atom/app-1.21.1/resources/app/src/workspace.js:492:28)
at WorkspaceCenter.paneContainer.onDidChangeActivePaneItem (~/AppData/Local/atom/app-1.21.1/resources/app/src/workspace-center.js:17:20)
at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.21.1/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.21.1/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at PaneContainer.didChangeActiveItemOnPane (~/AppData/Local/atom/app-1.21.1/resources/app/src/pane-container.js:284:26)
at Pane.module.exports.Pane.setActiveItem (~/AppData/Local/atom/app-1.21.1/resources/app/src/pane.js:339:22)
at Pane.module.exports.Pane.activateItem (~/AppData/Local/atom/app-1.21.1/resources/app/src/pane.js:492:27)
at TabBarView.module.exports.TabBarView.onClick (~/AppData/Local/atom/app-1.21.1/resources/app/node_modules/tabs/lib/tab-bar-view.js:715:25)
atom-beautify 0.30.5
atom-runner 2.7.1
autoclose-html 0.23.0
autocomplete-java 1.2.7
autocomplete-oracle 1.4.2
autocomplete-xml 0.9.4
busy-signal 1.4.3
file-icons 2.1.13
highlight-selected 0.13.1
hyperclick 0.1.5
intellij-idea-keymap 0.2.3
intentions 1.1.5
javascript-snippets 1.2.1
language-log 1.9.0
language-oracle 1.8.0
language-pgsql 0.2.3
linter 2.2.0
linter-javac 1.9.4
linter-ui-default 1.6.10
minimap 4.29.7
minimap-highlight-selected 4.6.1
platformio-ide-terminal 2.7.0
wakatime 7.0.3
xml-formatter 0.11.0
Trying to read a XSD file from a filesystem path that doesn't exist give an exception. It should be captured and give a nice error.
Uncaught TypeError: Cannot read property 'name' of undefined
At events.js:141
TypeError: Cannot read property 'name' of undefined
at Object.module.exports.initTypeObject (/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:110:37)
at Object.module.exports.parseType (/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:81:13)
at Object.module.exports.parse (/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:63:6)
at /.atom/packages/autocomplete-xml/lib/xsdParser.coffee:44:45
at Parser.<anonymous> (\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:483:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Object.onclosetag (\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:444:26)
at emit (\.atom\packages\autocomplete-xml\node_modules\xml2js\node_modules\sax\lib\sax.js:639:35)
at emitNode (\.atom\packages\autocomplete-xml\node_modules\xml2js\node_modules\sax\lib\sax.js:644:5)
at closeTag (\.atom\packages\autocomplete-xml\node_modules\xml2js\node_modules\sax\lib\sax.js:903:7)
at Object.write (\.atom\packages\autocomplete-xml\node_modules\xml2js\node_modules\sax\lib\sax.js:1444:13)
at Parser.exports.Parser.Parser.parseString (\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:502:31)
at Parser.bind [as parseString] (\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:7:59)
at Object.exports.parseString (\.atom\packages\autocomplete-xml\node_modules\xml2js\lib\xml2js.js:534:19)
at Object.module.exports.parseFromString (/.atom/packages/autocomplete-xml/lib/xsdParser.coffee:39:12)
at Object.module.exports.parseFromString (\.atom\packages\autocomplete-xml\lib\xsd.coffee:50:15)
at \.atom\packages\autocomplete-xml\lib\xsd.coffee:44:45
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.