{"action":"created","issue":{"url":"https://api.github.com/repos/mbakeranalecta/sam/issues/55","repository_url":"https://api.github.com/repos/mbakeranalecta/sam","labels_url":"https://api.github.com/repos/mbakeranalecta/sam/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/mbakeranalecta/sam/issues/55/comments","events_url":"https://api.github.com/repos/mbakeranalecta/sam/issues/55/events","html_url":"https://github.com/mbakeranalecta/sam/issues/55","id":151208009,"number":55,"title":"Parsed includes","user":{"login":"mbakeranalecta","id":1695653,"avatar_url":"https://avatars.githubusercontent.com/u/1695653?v=3","gravatar_id":"","url":"https://api.github.com/users/mbakeranalecta","html_url":"https://github.com/mbakeranalecta","followers_url":"https://api.github.com/users/mbakeranalecta/followers","following_url":"https://api.github.com/users/mbakeranalecta/following{/other_user}","gists_url":"https://api.github.com/users/mbakeranalecta/gists{/gist_id}","starred_url":"https://api.github.com/users/mbakeranalecta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbakeranalecta/subscriptions","organizations_url":"https://api.github.com/users/mbakeranalecta/orgs","repos_url":"https://api.github.com/users/mbakeranalecta/repos","events_url":"https://api.github.com/users/mbakeranalecta/events{/privacy}","received_events_url":"https://api.github.com/users/mbakeranalecta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-26T18:35:13Z","updated_at":"2016-06-18T12:23:14Z","closed_at":null,"body":"We have in insert mechanism, but as currently defined, it does not process the insertion, it just passes it on to the application layer to process. \r\n\r\nThis means that you cannot insert something and have it parsed as part of the current document. There are arguments to be made both ways on this. It keeps SAM simpler if it does not have to manage includes. On the other hand, most other markup languages do support includes. \r\n\r\nOne nice feature we would get if we did this would be that we could use it to import a list of predefined annotations so that the annotation lookup feature would not have to be extended to support an external file just for this purpose. (Of course, the insert would have to be into some part of the document that is not displayed, but that is an application domain issue. \r\n\r\nThe obvious issues with includes would be the legal boundary of an include and the effect on the indent level of the main source file. \r\n\r\nSuggested policies for this:\r\n\r\n*  Only allow includes at the block level.\r\n*  Process the indentation of the included file separately and then insert that into the structure at the indent level of the include instruction.\r\n*  Included file must be a sam file with a sam declaration\r\n*  The default namespace of the include file is honored\r\n*  The included material must fit the schema of the including file. \r\n*  The schema of the including file must specify an include instruction or the structure of the included file as alternative, to preserve stand-alone parsability.\r\n\r\nThe question is, should this be implemented with the existing block insert syntax (with a type of SAM) or with a different syntax that reflects its different behavior. "},"comment":{"url":"https://api.github.com/repos/mbakeranalecta/sam/issues/comments/226938694","html_url":"https://github.com/mbakeranalecta/sam/issues/55#issuecomment-226938694","issue_url":"https://api.github.com/repos/mbakeranalecta/sam/issues/55","id":226938694,"user":{"login":"mbakeranalecta","id":1695653,"avatar_url":"https://avatars.githubusercontent.com/u/1695653?v=3","gravatar_id":"","url":"https://api.github.com/users/mbakeranalecta","html_url":"https://github.com/mbakeranalecta","followers_url":"https://api.github.com/users/mbakeranalecta/followers","following_url":"https://api.github.com/users/mbakeranalecta/following{/other_user}","gists_url":"https://api.github.com/users/mbakeranalecta/gists{/gist_id}","starred_url":"https://api.github.com/users/mbakeranalecta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbakeranalecta/subscriptions","organizations_url":"https://api.github.com/users/mbakeranalecta/orgs","repos_url":"https://api.github.com/users/mbakeranalecta/repos","events_url":"https://api.github.com/users/mbakeranalecta/events{/privacy}","received_events_url":"https://api.github.com/users/mbakeranalecta/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T12:23:14Z","updated_at":"2016-06-18T12:23:14Z","body":"An alternate rule for includes could be that rather than the combination of including and included file having to match a single schema, that the including file's schema states where includes can occur and what schema the included material must obey. That way, each file is stand alone and can be authored and parsed separately. \r\n\r\nThis implies that the schema can allow the include instruction with different types in different places. "}}
{"actor":{"display_login":"mbakeranalecta"}}