Merge branch 'master' into specfiles

This commit is contained in:
Alhadis
2016-09-09 05:07:55 +10:00
14 changed files with 694 additions and 14 deletions

3
.gitmodules vendored
View File

@@ -788,3 +788,6 @@ url = https://github.com/austinwagner/sublime-sourcepawn
[submodule "vendor/grammars/language-rpm-spec"]
path = vendor/grammars/language-rpm-spec
url = https://github.com/waveclaw/language-rpm-spec
[submodule "vendor/grammars/language-emacs-lisp"]
path = vendor/grammars/language-emacs-lisp
url = https://github.com/Alhadis/language-emacs-lisp

View File

@@ -23,7 +23,7 @@ class GitLinguist
if @incremental && stats = load_language_stats
old_commit_oid, old_stats = stats
# A cache with NULL oid means that we want to froze
# A cache with NULL oid means that we want to freeze
# these language stats in place and stop computing
# them (for performance reasons)
return old_stats if old_commit_oid == NULL_OID
@@ -111,7 +111,7 @@ def git_linguist(args)
parser.parse!(args)
git_dir = `git rev-parse --git-dir`.strip
raise "git-linguist must be ran in a Git repository (#{Dir.pwd})" unless $?.success?
raise "git-linguist must be run in a Git repository (#{Dir.pwd})" unless $?.success?
wrapper = GitLinguist.new(git_dir, commit, incremental)
case args.pop

View File

@@ -22,6 +22,8 @@ vendor/grammars/Docker.tmbundle:
- source.dockerfile
vendor/grammars/Elm/:
- source.elm
- text.html.mediawiki.elm-build-output
- text.html.mediawiki.elm-documentation
vendor/grammars/FreeMarker.tmbundle:
- text.html.ftl
vendor/grammars/G-Code/:
@@ -354,6 +356,8 @@ vendor/grammars/language-csound:
- source.csound
- source.csound-document
- source.csound-score
vendor/grammars/language-emacs-lisp:
- source.emacs.lisp
vendor/grammars/language-gfm:
- source.gfm
vendor/grammars/language-graphql:
@@ -603,6 +607,8 @@ vendor/grammars/sublime-text-ox/:
vendor/grammars/sublime-typescript/:
- source.ts
- source.tsx
- text.error-list
- text.find-refs
vendor/grammars/sublime-varnish:
- source.varnish.vcl
vendor/grammars/sublime_cobol:

View File

@@ -354,7 +354,7 @@ module Linguist
disambiguate ".r" do |data|
if /\bRebol\b/i.match(data)
Language["Rebol"]
elsif data.include?("<-")
elsif /<-|^\s*#/.match(data)
Language["R"]
end
end

View File

@@ -12,7 +12,7 @@
# listed alphabetically)
# interpreters - An Array of associated interpreters
# searchable - Boolean flag to enable searching (defaults to true)
# search_term - Deprecated: Some languages maybe indexed under a
# search_term - Deprecated: Some languages may be indexed under a
# different alias. Avoid defining new exceptions.
# color - CSS hex color to represent the language.
# tm_scope - The TextMate scope that represents this programming
@@ -23,9 +23,9 @@
# in the statistics as the parent language.
#
# Any additions or modifications (even trivial) should have corresponding
# test change in `test/test_blob.rb`.
# test changes in `test/test_blob.rb`.
#
# Please keep this list alphabetized. Capitalization comes before lower case.
# Please keep this list alphabetized. Capitalization comes before lowercase.
1C Enterprise:
type: programming
@@ -1027,7 +1027,7 @@ Elm:
Emacs Lisp:
type: programming
tm_scope: source.lisp
tm_scope: source.emacs.lisp
color: "#c065db"
aliases:
- elisp
@@ -1035,6 +1035,7 @@ Emacs Lisp:
filenames:
- .emacs
- .emacs.desktop
- .spacemacs
extensions:
- .el
- .emacs
@@ -4148,6 +4149,7 @@ XML:
- .rdf
- .resx
- .rss
- .sch
- .scxml
- .sfproj
- .srdf

View File

@@ -0,0 +1,197 @@
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load. If it is the symbol `all' instead
;; of a list then all discovered layers will be installed.
dotspacemacs-configuration-layers
'(
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press <SPC f e R> (Vim style) or
;; <M-m f e R> (Emacs style) to install them.
;; ----------------------------------------------------------------
emacs-lisp
charlock_holmes
escape_utils
mime-types
rugged
minitest
mocha
plist
pry
rake
yajl-ruby
colour-proximity
licensed
licensee
;; List of additional packages that will be installed without being
;; wrapped in a layer. If you need some configuration for these
;; packages then consider to create a layer, you can also put the
;; configuration in `dotspacemacs/config'.
dotspacemacs-additional-packages '()
;; A list of packages and/or extensions that will not be install and loaded.
dotspacemacs-excluded-packages '()
;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
;; are declared in a layer which is not a member of
;; the list `dotspacemacs-configuration-layers'
dotspacemacs-delete-orphan-packages t))
(defun dotspacemacs/init ()
"Initialization function.
This function is called at the very startup of Spacemacs initialization
before layers configuration."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; Either `vim' or `emacs'. Evil is always enabled but if the variable
;; is `emacs' then the `holy-mode' is enabled at startup.
dotspacemacs-editing-style 'vim
;; If non nil output loading progress in `*Messages*' buffer.
dotspacemacs-verbose-loading nil
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed.
dotspacemacs-startup-banner 'official
;; List of items to show in the startup buffer. If nil it is disabled.
;; Possible values are: `recents' `bookmarks' `projects'."
dotspacemacs-startup-lists '(bookmarks projects recents)
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press <SPC> T n to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(
spacemacs-dark
spacemacs-light
solarized-dark
solarized-light
atom-light-ui
atom-dark-ui
atom-material-ui
zenburn
;; If non nil the cursor colour matches the state colour.
dotspacemacs-colorize-cursor-according-to-state t
;; Default font. `powerline-scale' allows to quickly tweak the mode-line
;; size to make separators look not too crappy.
dotspacemacs-default-font '("Menloco"
:size 11
:weight normal
:width normal
:powerline-scale 1.1)
;; The leader key
dotspacemacs-leader-key "SPC"
;; The leader key accessible in `emacs state' and `insert state'
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it.
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
;; The command key used for Evil commands (ex-commands) and
;; Emacs commands (M-x).
;; By default the command key is `:' so ex-commands are executed like in Vim
;; with `:' and Emacs commands are executed with `<leader> :'.
dotspacemacs-command-key ":"
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; Default value is `cache'.
dotspacemacs-auto-save-file-location 'cache
;; If non nil then `ido' replaces `helm' for some commands. For now only
;; `find-files' (SPC f f) is replaced.
dotspacemacs-use-ido nil
;; If non nil the paste micro-state is enabled. When enabled pressing `p`
;; several times cycle between the kill ring content.
dotspacemacs-enable-paste-micro-state nil
;; Guide-key delay in seconds. The Guide-key is the popup buffer listing
;; the commands bound to the current keystrokes.
dotspacemacs-guide-key-delay 0.4
;; If non nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil ;; to boost the loading time.
dotspacemacs-loading-progress-bar t
;; If non nil the frame is fullscreen when Emacs starts up.
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup nil
;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX."
dotspacemacs-fullscreen-use-non-native nil
;; If non nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'.
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'.
dotspacemacs-inactive-transparency 90
;; If non nil unicode symbols are displayed in the mode line.
dotspacemacs-mode-line-unicode-symbols t
;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters the
;; point when it reaches the top or bottom of the screen.
dotspacemacs-smooth-scrolling t
;; If non-nil smartparens-strict-mode will be enabled in programming modes.
dotspacemacs-smartparens-strict-mode nil
;; Select a scope to highlight delimiters. Possible value is `all',
;; `current' or `nil'. Default is `all'
dotspacemacs-highlight-delimiters 'all
;; If non nil advises quit functions to keep server open when quitting.
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
;; The default package repository used if no explicit repository has been
;; specified with an installed package.
;; Not used for now.
dotspacemacs-default-package-repository nil
;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
;; derivatives. If set to `relative', also turns on relative line numbers.
;; (default nil)
dotspacemacs-line-numbers 'relative
;; Delete whitespace while saving buffer. Possible values are `all',
;; `trailing', `changed' or `nil'. Default is `changed' (cleanup whitespace
;; on changed lines) (default 'changed)
dotspacemacs-whitespace-cleanup 'changed
)
;; User initialization goes here
)
(defun dotspacemacs/user-config ()
"Configuration function.
This function is called at the very end of Spacemacs initialization after
layers configuration."
(add-hook 'alchemist-mode-hook 'company-mode)
(add-hook 'projectile-mode-hook 'projectile-rails-on)
(setq ruby-insert-encoding-magic-comment nil)
(setq web-mode-markup-indent-offset 2)
(setq web-mode-code-indent-offset 2)
(spacemacs/toggle-golden-ratio-on)
(spacemacs/toggle-indent-guide-globally-on)
(spacemacs/toggle-centered-point-globally-on)
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

207
samples/XML/HITSP_C32.sch Normal file
View File

@@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
Retrieved on 2016-08-30 from http://cda-validation.nist.gov/cda-validation/downloads.html.
Disclaimer from the National Institute of Standards and Technology website:
"Unless otherwise noted, this software was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. The CDA Guideline Validator is an experimental system. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. We would appreciate acknowledgement if the software is used."
-->
<!DOCTYPE schema [
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.1 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.1.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.2 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.2.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.3 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.3.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.4 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.4.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.5 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.5.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.6 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.6.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.7 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.7.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.8 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.8.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.9 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.9.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.10 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.10.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.11 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.11.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.12 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.12.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.13 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.13.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.14 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.14.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.15 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.15.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.16 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.16.ent'>
<!ENTITY ent-2.16.840.1.113883.3.88.11.32.17 SYSTEM 'templates/2.16.840.1.113883.3.88.11.32.17.ent'>
]>
<schema xmlns="http://www.ascc.net/xml/schematron" xmlns:cda="urn:hl7-org:v3">
<!--
To use iso schematron instead of schematron 1.5,
change the xmlns attribute from
"http://www.ascc.net/xml/schematron"
to
"http://purl.oclc.org/dsdl/schematron"
-->
<title>HITSP_C32</title>
<ns prefix="cda" uri="urn:hl7-org:v3"/>
<ns prefix="sdtc" uri="urn:hl7-org:sdtc"/>
<ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
<phase id='errors'>
<active pattern='p-2.16.840.1.113883.3.88.11.32.1-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.2-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.3-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.4-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.5-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.6-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.7-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.8-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.9-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.10-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.11-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.12-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.13-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.14-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.15-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.16-errors'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.17-errors'/>
</phase>
<phase id='warning'>
<active pattern='p-2.16.840.1.113883.3.88.11.32.1-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.2-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.3-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.4-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.5-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.6-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.7-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.8-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.9-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.10-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.11-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.12-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.13-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.14-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.15-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.16-warning'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.17-warning'/>
</phase>
<phase id='note'>
<active pattern='p-2.16.840.1.113883.3.88.11.32.1-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.2-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.3-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.4-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.5-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.6-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.7-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.8-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.9-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.10-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.11-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.12-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.13-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.14-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.15-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.16-note'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.17-note'/>
</phase>
<phase id='violation'>
<active pattern='p-2.16.840.1.113883.3.88.11.32.4-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.5-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.6-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.7-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.8-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.9-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.10-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.11-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.12-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.13-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.14-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.15-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.16-violation'/>
<active pattern='p-2.16.840.1.113883.3.88.11.32.17-violation'/>
</phase>
<!-- Template_2.16.840.1.113883.3.88.11.32.1 -->
<!-- HITSP/C32 Registration and Medication History -->
&ent-2.16.840.1.113883.3.88.11.32.1;
<!-- Template_2.16.840.1.113883.3.88.11.32.2 -->
<!-- HITSP/C32 Language Spoken Module -->
&ent-2.16.840.1.113883.3.88.11.32.2;
<!-- Template_2.16.840.1.113883.3.88.11.32.3 -->
<!-- HITSP/C32 Support Module -->
&ent-2.16.840.1.113883.3.88.11.32.3;
<!-- Template_2.16.840.1.113883.3.88.11.32.4 -->
<!-- HITSP/C32 Healthcare Provider Module -->
&ent-2.16.840.1.113883.3.88.11.32.4;
<!-- Template_2.16.840.1.113883.3.88.11.32.5 -->
<!-- HITSP/C32 Insurance Provider Module -->
&ent-2.16.840.1.113883.3.88.11.32.5;
<!-- Template_2.16.840.1.113883.3.88.11.32.6 -->
<!-- HITSP/C32 Allergies and Drug Sensitivities Module -->
&ent-2.16.840.1.113883.3.88.11.32.6;
<!-- Template_2.16.840.1.113883.3.88.11.32.7 -->
<!-- HITSP/C32 Conditions Module -->
&ent-2.16.840.1.113883.3.88.11.32.7;
<!-- Template_2.16.840.1.113883.3.88.11.32.8 -->
<!-- HITSP/C32 Medications - Administration Information Module -->
&ent-2.16.840.1.113883.3.88.11.32.8;
<!-- Template_2.16.840.1.113883.3.88.11.32.9 -->
<!-- HITSP/C32 Medications Module, Medication Information data element -->
&ent-2.16.840.1.113883.3.88.11.32.9;
<!-- Template_2.16.840.1.113883.3.88.11.32.10 -->
<!-- HITSP/C32 Medications Module, Medication Information, Type of Medication data element -->
&ent-2.16.840.1.113883.3.88.11.32.10;
<!-- Template_2.16.840.1.113883.3.88.11.32.11 -->
<!-- HITSP/C32 Order Information data element -->
&ent-2.16.840.1.113883.3.88.11.32.11;
<!-- Template_2.16.840.1.113883.3.88.11.32.12 -->
<!-- HITSP/C32 Comments Module -->
&ent-2.16.840.1.113883.3.88.11.32.12;
<!-- Template_2.16.840.1.113883.3.88.11.32.13 -->
<!-- HITSP/C32 Advance Directives Module -->
&ent-2.16.840.1.113883.3.88.11.32.13;
<!-- Template_2.16.840.1.113883.3.88.11.32.14 -->
<!-- HITSP/C32 Immunizations Module -->
&ent-2.16.840.1.113883.3.88.11.32.14;
<!-- Template_2.16.840.1.113883.3.88.11.32.15 -->
<!-- HITSP/C32 Vital Signs Module -->
&ent-2.16.840.1.113883.3.88.11.32.15;
<!-- Template_2.16.840.1.113883.3.88.11.32.16 -->
<!-- HITSP/C32 Results Module -->
&ent-2.16.840.1.113883.3.88.11.32.16;
<!-- Template_2.16.840.1.113883.3.88.11.32.17 -->
<!-- HITSP/C32 Encounters Module -->
&ent-2.16.840.1.113883.3.88.11.32.17;
</schema>

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron"
queryBinding="xslt2"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- XSLT 2.0 Schematron by Wendell Piez (Mulberry Technologies, Inc.),
August 2011 -->
<!-- This Schematron is released into the public domain.
Please credit your sources. -->
<!-- Requires Schematron that allows embedded XSLT 2.0 with support for
the namespace:: axis. Tested with Saxon 9.3.0.5. -->
<ns prefix="m" uri="http://www.mulberrytech.com/xslt/util"/>
<xsl:variable name="ns-set" xmlns:m="http://www.mulberrytech.com/xslt/util">
<!-- include elements to declare expected namespace prefixes
with their bindings, like so:
(prefix 'mml')
<m:ns prefix="mml" uri="http://www.w3.org/1998/Math/MathML"/>
(default namespace, no prefix)
<m:ns prefix="" uri="http://www.w3.org/1998/Math/MathML"/>
-->
<m:ns prefix="mml" uri="http://www.w3.org/1998/Math/MathML"/>
<m:ns prefix="xlink" uri="http://www.w3.org/1999/xlink"/>>
<m:ns prefix="oasis" uri="http://docs.oasis-open.org/ns/oasis-exchange/table"/>
<!-- 'xml' prefix is always in scope with this binding -->
<m:ns prefix="xml" uri="http://www.w3.org/XML/1998/namespace"/>
</xsl:variable>
<pattern>
<!-- checking the document element against the spec given in ns-set -->
<rule context="/*">
<let name="new-prefixes" value="in-scope-prefixes(.)[not(. = $ns-set/m:ns/@prefix)]"/>
<let name="new-namespaces" value="(for $p in (in-scope-prefixes(.)) return namespace-uri-for-prefix($p,.))
[not(. = $ns-set/m:ns/@uri)]"/>
<report test="exists($new-prefixes)">
Unrecognized namespace prefix<xsl:value-of select="('es')[count($new-prefixes) gt 1]"/>:
<value-of select="string-join(
(for $p in $new-prefixes return m:label($p)),
', ')"/>
</report>
<report test="exists($new-namespaces)">
Unrecognized namespace URI<xsl:value-of select="('s')[count($new-namespaces) gt 1]"/>:
<value-of select="string-join(($new-namespaces),', ')"/>
</report>
<let name="misassigned-prefixes" value="in-scope-prefixes(.)[not(.=$new-prefixes)]
[for $p in (.) return
namespace-uri-for-prefix($p,current()) ne $ns-set/m:ns[@prefix=$p]/@uri]"/>
<report test="exists($misassigned-prefixes)">
Prefix<xsl:value-of select="('es')[count($misassigned-prefixes) gt 1]"/>
assigned incorrectly: <value-of select="string-join(
(for $p in $misassigned-prefixes return
concat(m:label($p), ' (should be ''',$ns-set/m:ns[@prefix=$p]/@uri,''')')),
'; ')"/>
</report>
</rule>
<!-- Elsewhere, all namespaces given must correspond with those
on the parent -->
<rule context="*">
<assert test="every $n in (namespace::*) satisfies
exists(../namespace::*[deep-equal(.,$n)])">
Namespace may not be declared here.
</assert>
<assert test="every $n in (../namespace::*) satisfies
exists(namespace::*[deep-equal(.,$n)])">
Namespace may not be undeclared here.
</assert>
</rule>
</pattern>
<xsl:function name="m:label" as="xs:string">
<xsl:param name="label" as="xs:string"/>
<xsl:sequence select="if (string($label)) then concat('''',$label,'''') else '[unprefixed]'"/>
</xsl:function>
</schema>

151
samples/XML/oasis-table.sch Normal file
View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================= -->
<!--
This work is in the public domain and may be reproduced, published or
otherwise used without the permission of the National Library of Medicine (NLM).
We request only that the NLM is cited as the source of the work.
Although all reasonable efforts have been taken to ensure the accuracy and
reliability of the software and data, the NLM and the U.S. Government do
not and cannot warrant the performance or results that may be obtained by
using this software or data. The NLM and the U.S. Government disclaim all
warranties, express or implied, including warranties of performance,
merchantability or fitness for any particular purpose.
-->
<!-- ============================================================= -->
<schema xmlns="http://purl.oclc.org/dsdl/schematron"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://mulberrytech.com/xslt/oasis-html/util"
queryBinding="xslt2">
<title>OASIS/CALS table validation</title>
<!-- Mulberry Technologies (wap)
Designed for JATS, but probably also useful in other
systems using OASIS/CALS/Docbook tables
Assumes a table DTD (or schema) valid to the OASIS/CALS/Docbook model
-->
<ns prefix="o" uri="http://docs.oasis-open.org/ns/oasis-exchange/table"/>
<ns prefix="m" uri="http://mulberrytech.com/xslt/oasis-html/util"/>
<!--<ns prefix="xsl" uri="http://www.w3.org/1999/XSL/Transform"/>-->
<!-- the included stylesheet includes key and function declarations required -->
<xsl:include href="oasis-exchange-support.xsl"/>
<let name="default-border-style" value="solid"/>
<pattern>
<rule context="o:tgroup">
<let name="okay-cols" value="@cols[. castable as xs:integer][. > 0]"/>
<assert test="exists(@cols)">tgroup/@cols is not given</assert>
<assert test="empty(@cols) or exists($okay-cols)">@cols should be a natural number
(integer greater than zero).</assert>
<assert test="empty($okay-cols) or empty(o:colspec) or (count(o:colspec) = @cols)">The tgroup has
<value-of select="count(o:colspec)"/> colspec<value-of select="if (count(o:colspec) = 1) then '' else 's'"/>,
but its @cols is given as '<value-of select="@cols"/>'.</assert>
<report test="not(*/o:row/m:actual-cols(.) != */o:row/m:actual-cols(.))
and ($okay-cols != m:actual-cols((*/o:row)[1]))">tgroup/@cols is given as
<value-of select="$okay-cols"/>, but all rows have <value-of
select="m:actual-cols((*/o:row)[1])"/> entr<value-of
select="if (m:actual-cols((*/o:row)[1]) eq 1) then 'y' else 'ies'"/>.
</report>
<report test="@align='char'" role="warning">Without assigning @char or @charoff to everything,
assigning @align='char' to tgroup only aligns contents to right of center.</report>
</rule>
<rule context="o:colspec">
<let name="okay-colwidth"
value="@colwidth[exists(m:colwidth-unit(current()))]"/>
<assert test="empty(@colwidth) or exists($okay-colwidth)">Malformed @colwidth.</assert>
<assert test="empty($okay-colwidth) or
(count(../o:colspec[m:colwidth-unit(.)=m:colwidth-unit(current())]) &gt;
count(../o:colspec[not(m:colwidth-unit(.)=m:colwidth-unit(current()))]))">@colwidth unit
(<value-of select="m:colwidth-unit(.)"/>) is not consistent with the
units on other colspecs.</assert>
<assert test="empty($okay-colwidth) or matches($okay-colwidth,'^\s*\*\s*$')
or (xs:double(replace($okay-colwidth,'[\s\p{L}\*]','')[. castable as xs:double]) &gt; 0)">@colwidth must be positive</assert>
<report test="empty(m:colwidth-unit(.))
and exists(../o:colspec/m:colwidth-unit(.))">The same unit of measure should be used on every
colspec/@colwidth.</report>
<assert test="empty(@colnum) or (@colnum = count(.|preceding-sibling::o:colspec))">@colnum
'<value-of select="@colnum"/>' does not correspond to
the column's actual number (<value-of select="count(.|preceding-sibling::o:colspec)"/>)</assert>
<report test="@colname = (../o:colspec except .)/@colname">The same @colname is assigned to more than
one colspec.</report>
<assert test="not(@align='char') or exists(@char)" role="warning">@align='char', but no @char is given.</assert>
<report test="normalize-space(@char) and not((@align,../@align)[1]='char')">@char is given, but alignment is not 'char'.</report>
<assert test="empty(@charoff) or ((@align,../@align)[1]='char')" role="warning">@charoff is given, but alignment is not 'char'.</assert>
</rule>
<rule context="o:row">
<let name="tgroup" value="ancestor::o:tgroup[1]"/>
<let name="rowno" value="m:rowno(.)"/>
<let name="given-entries" value="count(distinct-values(key('entry-by-row',$rowno,$tgroup)/m:across(.)))"/>
<report test="$given-entries &lt; $tgroup/@cols
and exists($tgroup/@cols[. castable as xs:integer])" role="warning">
The row doesn't have enough entries (<value-of select="$tgroup/@cols"/>
<value-of select="if ($tgroup/@cols=1) then ' is' else ' are'"/> expected;
<value-of select="$given-entries"/> <value-of select="if ($given-entries=1) then ' is' else ' are'"/> given).
</report>
</rule>
<rule context="o:entry">
<let name="tgroup" value="ancestor::o:tgroup[1]"/>
<assert test="empty(@nameend) or exists(key('colspec-by-name',@nameend,$tgroup))">No colspec is
named <value-of select="@nameend"/>.</assert>
<assert test="empty(@nameend|@namest) or
(key('colspec-by-name',@nameend,$tgroup) >> key('colspec-by-name',@namest,$tgroup))">Entry's end
column (<value-of select="@nameend"/>) must follow its start column
(<value-of select="@namest"/>).</assert>
<assert test="empty(@namest) or exists(key('colspec-by-name',@namest,$tgroup))">No colspec is
named <value-of select="@namest"/>.</assert>
<assert test="empty(@colname) or exists(key('colspec-by-name',@colname,$tgroup))">No colspec is
named <value-of select="@colname"/>.</assert>
<assert test="empty(@nameend) or exists(@colname|@namest)">Entry is assigned an end
column (<value-of select="@nameend"/>) but not a start column.</assert>
<assert test="not(@colname != @namest)">Entry is assigned to column <value-of select="@colname"/>,
so it can't start at column <value-of select="@namest"/>.
</assert>
<assert test="m:across(.)[1] &gt; (preceding-sibling::o:entry[1]/m:across(.)[last()],0)[1]">
Entry must be assigned to a free column (after its preceding entries).
</assert>
<report test="m:down(.) &gt; m:rowno(../../o:row[last()])">This entry doesn't fit into
its <value-of select="local-name(../..)"/>.</report>
<report test="(exists(@morerows) and
(key('entry-by-row',m:down(.),$tgroup)/m:across(.)[last()] &gt; $tgroup/@cols))
or empty($tgroup/@cols)" role="warning">
A row in which this entry appears has too many entries.
</report>
<!-- the next rule will never fire for entries spanning columns: they always
fit by virtue of being assigned a @nameend -->
<report test="(m:across(.)[last()] &gt; $tgroup/@cols) or empty($tgroup/@cols)">
Entry does not fit in row. (<value-of select="$tgroup/@cols"/> are allowed; entry
is in column <value-of select="m:across(.)[last()]"/>.)
<!-- Entry does not fit in row. (# columns are allowed; row ends in column #.) -->
</report>
<assert test="empty(@char) or m:align(.)='char'" role="warning">@char is given, but alignment is not 'char'.</assert>
<assert test="empty(@charoff) or m:align(.)='char'" role="warning">@charoff is given, but alignment is not 'char'.</assert>
<assert test="empty(@charoff) or ((@charoff castable as xs:integer) and
(@charoff &gt;= 0) and (@charoff &lt;= 100))">@charoff must be a whole number between 0 and 100.</assert>
<assert test="not(m:align(.)='char') or exists(@char|m:colspec-for-entry(.)/@char)" role="warning">
Entry is designated for character alignment, but no character (@char) is given on it or its colspec.
</assert>
<assert test="empty(@char) or not(@char != m:colspec-for-entry(.)/@char)">
Entry is assigned an alignment character (<value-of select="@char"/>)
different from its column's (<value-of select="m:colspec-for-entry(.)/@char"/>).</assert>
<report test="exists(*) and (m:align(.)='char')" role="warning">With @align='char', markup of
entry contents (<value-of select="string-join(distinct-values(*/name()),', ')"/>) will be ignored.</report>
</rule>
</pattern>
</schema>

View File

@@ -42,7 +42,7 @@ class DirectoryPackage
case File.extname(path.downcase)
when '.plist'
path.split('/')[-2] == 'Syntaxes'
when '.tmlanguage'
when '.tmlanguage', '.yaml-tmlanguage', '.sublime-syntax'
true
when '.cson', '.json'
path.split('/')[-2] == 'grammars'
@@ -114,7 +114,7 @@ class SVNPackage
def fetch(tmp_dir)
`svn export -q "#{url}/Syntaxes" "#{tmp_dir}/Syntaxes"`
raise "Failed to export SVN repository: #{url}: #{$?.to_s}" unless $?.success?
Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage}"]
Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,YAML-tmLanguage,sublime-syntax}"]
end
end
@@ -148,6 +148,17 @@ def load_grammar(path)
case File.extname(path.downcase)
when '.plist', '.tmlanguage'
Plist::parse_xml(path)
when '.yaml-tmlanguage', '.sublime-syntax'
content = File.read(path)
# Attempt to parse YAML file even if it has a YAML 1.2 header
if content.lines[0] =~ /^%YAML[ :]1\.2/
content = content.lines[1..-1].join
end
begin
YAML.load(content)
rescue Psych::SyntaxError => e
$stderr.puts "Failed to parse YAML grammar '#{path}'"
end
when '.cson'
cson = `"#{CSONC}" "#{path}"`
raise "Failed to convert CSON grammar '#{path}': #{$?.to_s}" unless $?.success?
@@ -169,7 +180,7 @@ def load_grammars(tmp_dir, source, all_scopes)
else
SingleFile.new(source)
end
elsif source.end_with?('.tmLanguage', '.plist')
elsif source.end_with?('.tmLanguage', '.plist', '.YAML-tmLanguage', '.sublime-syntax')
SingleGrammar.new(source)
elsif source.start_with?('https://github.com')
GitHubPackage.new(source)
@@ -185,7 +196,7 @@ def load_grammars(tmp_dir, source, all_scopes)
p.fetch(tmp_dir).map do |path|
grammar = load_grammar(path)
scope = grammar['scopeName']
scope = grammar['scopeName'] || grammar['scope']
if all_scopes.key?(scope)
unless all_scopes[scope] == p.url
@@ -204,7 +215,7 @@ def install_grammars(grammars, path)
installed = []
grammars.each do |grammar|
scope = grammar['scopeName']
scope = grammar['scopeName'] || grammar['scope']
File.write(File.join(GRAMMARS_PATH, "#{scope}.json"), JSON.pretty_generate(grammar))
installed << scope
end

View File

@@ -0,0 +1,18 @@
---
type: grammar
name: language-emacs-lisp
license: isc
---
Copyright (c) 2016, John Gardner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.