{"action":"created","issue":{"url":"https://api.github.com/repos/marklogic/entity-services/issues/292","repository_url":"https://api.github.com/repos/marklogic/entity-services","labels_url":"https://api.github.com/repos/marklogic/entity-services/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/marklogic/entity-services/issues/292/comments","events_url":"https://api.github.com/repos/marklogic/entity-services/issues/292/events","html_url":"https://github.com/marklogic/entity-services/issues/292","id":222507985,"number":292,"title":"Error generating TDE","user":{"login":"matt-turner","id":4526466,"avatar_url":"https://avatars1.githubusercontent.com/u/4526466?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-turner","html_url":"https://github.com/matt-turner","followers_url":"https://api.github.com/users/matt-turner/followers","following_url":"https://api.github.com/users/matt-turner/following{/other_user}","gists_url":"https://api.github.com/users/matt-turner/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-turner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-turner/subscriptions","organizations_url":"https://api.github.com/users/matt-turner/orgs","repos_url":"https://api.github.com/users/matt-turner/repos","events_url":"https://api.github.com/users/matt-turner/events{/privacy}","received_events_url":"https://api.github.com/users/matt-turner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jmakeig","id":176233,"avatar_url":"https://avatars3.githubusercontent.com/u/176233?v=3","gravatar_id":"","url":"https://api.github.com/users/jmakeig","html_url":"https://github.com/jmakeig","followers_url":"https://api.github.com/users/jmakeig/followers","following_url":"https://api.github.com/users/jmakeig/following{/other_user}","gists_url":"https://api.github.com/users/jmakeig/gists{/gist_id}","starred_url":"https://api.github.com/users/jmakeig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmakeig/subscriptions","organizations_url":"https://api.github.com/users/jmakeig/orgs","repos_url":"https://api.github.com/users/jmakeig/repos","events_url":"https://api.github.com/users/jmakeig/events{/privacy}","received_events_url":"https://api.github.com/users/jmakeig/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmakeig","id":176233,"avatar_url":"https://avatars3.githubusercontent.com/u/176233?v=3","gravatar_id":"","url":"https://api.github.com/users/jmakeig","html_url":"https://github.com/jmakeig","followers_url":"https://api.github.com/users/jmakeig/followers","following_url":"https://api.github.com/users/jmakeig/following{/other_user}","gists_url":"https://api.github.com/users/jmakeig/gists{/gist_id}","starred_url":"https://api.github.com/users/jmakeig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmakeig/subscriptions","organizations_url":"https://api.github.com/users/jmakeig/orgs","repos_url":"https://api.github.com/users/jmakeig/repos","events_url":"https://api.github.com/users/jmakeig/events{/privacy}","received_events_url":"https://api.github.com/users/jmakeig/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2017-04-18T18:40:06Z","updated_at":"2017-04-18T23:24:30Z","closed_at":null,"body":"Hi - I'm creating a demo using ES on standards documents with a schema called STS. I've got the description up and working, can generate envelop documents, but when I go to validate and install the TDE I get this error:\r\n\r\n```\r\n[javascript] TDE-INVALIDTEMPLATE: (err:FOER0000) tde.templateInsert( -- Invalid TDE template: XDMP-NOTSIMPLE: Node does not have simple content: fn:doc(\"/source/models/sts-templ.xml\")/tde:template/tde:templates/tde:template[2]/tde:templates/tde:template/tde:rows/tde:row/tde:columns/tde:column[2]/tde:scalar-type\r\n```\r\n\r\nI'm attaching my model and the generated template (as a .zip)\r\n\r\nThere is one array in the definition that defined entity for normative references attached to each standard.\r\n\r\nThe TDE seems to be stopping on line 132 where there is an empty scalar type.  Not sure what should be there to accomplish the definition of the normative refs.\r\n\r\nI created all this with EA4 (9.020170113) but just ran it all again with 9.0-20170418. I'm running Mac OS.\r\n\r\nThanks in advance,\r\n\r\nMatt\r\n\r\n\r\n[sts-demo.zip](https://github.com/marklogic/entity-services/files/930703/sts-demo.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/marklogic/entity-services/issues/comments/295013366","html_url":"https://github.com/marklogic/entity-services/issues/292#issuecomment-295013366","issue_url":"https://api.github.com/repos/marklogic/entity-services/issues/292","id":295013366,"user":{"login":"bsrikan","id":16124406,"avatar_url":"https://avatars2.githubusercontent.com/u/16124406?v=3","gravatar_id":"","url":"https://api.github.com/users/bsrikan","html_url":"https://github.com/bsrikan","followers_url":"https://api.github.com/users/bsrikan/followers","following_url":"https://api.github.com/users/bsrikan/following{/other_user}","gists_url":"https://api.github.com/users/bsrikan/gists{/gist_id}","starred_url":"https://api.github.com/users/bsrikan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsrikan/subscriptions","organizations_url":"https://api.github.com/users/bsrikan/orgs","repos_url":"https://api.github.com/users/bsrikan/repos","events_url":"https://api.github.com/users/bsrikan/events{/privacy}","received_events_url":"https://api.github.com/users/bsrikan/received_events","type":"User","site_admin":false},"created_at":"2017-04-18T23:24:30Z","updated_at":"2017-04-18T23:24:30Z","body":"> Shouldn’t we just transform the names in the TDE generation so that they’re valid, such as converting - to _?\r\n\r\nIt would be a good idea to rather add this rule to model-validate() so folks dont hit this issue in later stages.\r\n\r\n@matt-turner \r\nYou can try editing norm-refs as below:\r\n```\r\n\"norm-refs\": {\r\n\"datatype\": \"array\", \r\n\"items\": {\r\n\"$ref\": \"#/definitions/Std_ref\"\r\n}\r\n}\r\n```\r\n\r\nand adding another entity type as so:\r\n```\r\n\"Std_ref\": {\r\n\"properties\": {\r\n\"std_ref\": {\r\n\"datatype\": \"string\"\r\n}\r\n}\r\n}\r\n```\r\n\r\nWith this you have to edit the generated conversion-module to add a \"/*\" as shown in Post Edit:\r\nOOTB:\r\n`  =>es:optional('norm-refs',              es:extract-array($source-node/norm-refs, standard:extract-instance-Std_ref#1))`\r\nPost Edit:\r\n`  =>es:optional('norm-refs',              es:extract-array($source-node/norm-refs/*, standard:extract-instance-Std_ref#1))`\r\n"}}
{"actor":{"display_login":"bsrikan"}}