From 50bd2cc3c8e8f391168aedb0e88eeeee997deba8 Mon Sep 17 00:00:00 2001 From: Shaun Akhtar Date: Wed, 31 Aug 2016 12:56:02 -0400 Subject: [PATCH] Add support for Schematron XML validation files (.sch) Update languages.yml and add three public domain sample documents. --- lib/linguist/languages.yml | 1 + samples/XML/HITSP_C32.sch | 207 +++++++++++++++++++++++++++++++ samples/XML/namespace-strict.sch | 84 +++++++++++++ samples/XML/oasis-table.sch | 151 ++++++++++++++++++++++ 4 files changed, 443 insertions(+) create mode 100644 samples/XML/HITSP_C32.sch create mode 100644 samples/XML/namespace-strict.sch create mode 100644 samples/XML/oasis-table.sch diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index f8e97318..18977873 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4139,6 +4139,7 @@ XML: - .rdf - .resx - .rss + - .sch - .scxml - .sfproj - .srdf diff --git a/samples/XML/HITSP_C32.sch b/samples/XML/HITSP_C32.sch new file mode 100644 index 00000000..62750fdd --- /dev/null +++ b/samples/XML/HITSP_C32.sch @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + +]> + + + HITSP_C32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &ent-2.16.840.1.113883.3.88.11.32.1; + + + + + &ent-2.16.840.1.113883.3.88.11.32.2; + + + + + &ent-2.16.840.1.113883.3.88.11.32.3; + + + + + &ent-2.16.840.1.113883.3.88.11.32.4; + + + + + &ent-2.16.840.1.113883.3.88.11.32.5; + + + + + &ent-2.16.840.1.113883.3.88.11.32.6; + + + + + &ent-2.16.840.1.113883.3.88.11.32.7; + + + + + &ent-2.16.840.1.113883.3.88.11.32.8; + + + + + &ent-2.16.840.1.113883.3.88.11.32.9; + + + + + &ent-2.16.840.1.113883.3.88.11.32.10; + + + + + &ent-2.16.840.1.113883.3.88.11.32.11; + + + + + &ent-2.16.840.1.113883.3.88.11.32.12; + + + + + &ent-2.16.840.1.113883.3.88.11.32.13; + + + + + &ent-2.16.840.1.113883.3.88.11.32.14; + + + + + &ent-2.16.840.1.113883.3.88.11.32.15; + + + + + &ent-2.16.840.1.113883.3.88.11.32.16; + + + + + &ent-2.16.840.1.113883.3.88.11.32.17; + + diff --git a/samples/XML/namespace-strict.sch b/samples/XML/namespace-strict.sch new file mode 100644 index 00000000..f55a5143 --- /dev/null +++ b/samples/XML/namespace-strict.sch @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + Unrecognized namespace prefix: + + + + Unrecognized namespace URI: + + + + + + Prefix + assigned incorrectly: + + + + + + + Namespace may not be declared here. + + + Namespace may not be undeclared here. + + + + + + + + + + \ No newline at end of file diff --git a/samples/XML/oasis-table.sch b/samples/XML/oasis-table.sch new file mode 100644 index 00000000..c947aeb2 --- /dev/null +++ b/samples/XML/oasis-table.sch @@ -0,0 +1,151 @@ + + + + + + + + + OASIS/CALS table validation + + + + + + + + + + + + + + + + tgroup/@cols is not given + @cols should be a natural number + (integer greater than zero). + The tgroup has + colspec, + but its @cols is given as ''. + tgroup/@cols is given as + , but all rows have entr. + + Without assigning @char or @charoff to everything, + assigning @align='char' to tgroup only aligns contents to right of center. + + + + + Malformed @colwidth. + @colwidth unit + () is not consistent with the + units on other colspecs. + + @colwidth must be positive + The same unit of measure should be used on every + colspec/@colwidth. + + @colnum + '' does not correspond to + the column's actual number () + The same @colname is assigned to more than + one colspec. + @align='char', but no @char is given. + @char is given, but alignment is not 'char'. + @charoff is given, but alignment is not 'char'. + + + + + + + + The row doesn't have enough entries ( + expected; + given). + + + + + No colspec is + named . + Entry's end + column () must follow its start column + (). + No colspec is + named . + No colspec is + named . + Entry is assigned an end + column () but not a start column. + Entry is assigned to column , + so it can't start at column . + + + + Entry must be assigned to a free column (after its preceding entries). + + + This entry doesn't fit into + its . + + + A row in which this entry appears has too many entries. + + + + Entry does not fit in row. ( are allowed; entry + is in column .) + + + + @char is given, but alignment is not 'char'. + @charoff is given, but alignment is not 'char'. + @charoff must be a whole number between 0 and 100. + + Entry is designated for character alignment, but no character (@char) is given on it or its colspec. + + + Entry is assigned an alignment character () + different from its column's (). + With @align='char', markup of + entry contents () will be ignored. + + + \ No newline at end of file