Skip to content

Commit

Permalink
Hack to allow xsi:schemaLocation at the parents of <CMD>.
Browse files Browse the repository at this point in the history
  • Loading branch information
cagri coltekin committed Feb 2, 2016
1 parent 6c32add commit d650c7f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>eu.clarin.weblicht</groupId>
<artifactId>TCF</artifactId>
<version>0.4.5</version>
<version>0.4.6</version>
<packaging>jar</packaging>

<name>TCF</name>
Expand Down
2 changes: 2 additions & 0 deletions src/main/rnc-schema/d-spin-local_0_4.rnc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
default namespace = "http://www.dspin.de/data"
namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"

element D-Spin {

attribute version { "0.4" },
attribute xsi:schemaLocation {text}?,

external "metadata_0_4.rnc",
external "extdata_0_4.rnc"?,
Expand Down
3 changes: 2 additions & 1 deletion src/main/rnc-schema/d-spin_0_4.rnc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
default namespace = "http://www.dspin.de/data"
namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"

element D-Spin {

attribute version { "0.4" },

attribute xsi:schemaLocation {text}?,
external "http://de.clarin.eu/images/weblicht-tutorials/resources/tcf-04/schemas/latest/metadata_0_4.rnc",
external "http://de.clarin.eu/images/weblicht-tutorials/resources/tcf-04/schemas/latest/extdata_0_4.rnc"?,
(external "http://de.clarin.eu/images/weblicht-tutorials/resources/tcf-04/schemas/latest/textcorpus_0_4.rnc" |
Expand Down
25 changes: 14 additions & 11 deletions src/main/rnc-schema/metadata_0_4.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ namespace cmd = "http://www.clarin.eu/cmd/"
namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"

start =
element MetaData {(
element Services { CMD }? # use this element for wrapping chain CMD
&
element md { # deprecated, don't use it (left for backward compatibility)
attribute name { xsd:string },
attribute value { xsd:string }
}*
&
element source { text }? # deprecated, don't use it (left for backward compatibility)
)}
element MetaData {
attribute xsi:schemaLocation {text}?,
(
element Services { CMD }? # use this element for wrapping chain CMD
&
element md { # deprecated, don't use it (left for backward compatibility)
attribute name { xsd:string },
attribute value { xsd:string }
}*
&
element source { text }? # deprecated, don't use it (left for backward compatibility)
)
}

# Original schema is xsd schema, here converted to rnc. The converted version might be not complete.
# For original schema see:
Expand Down Expand Up @@ -176,4 +179,4 @@ CMD =
any =
element * {
attribute * {text}*, (any|text)*
}
}
10 changes: 5 additions & 5 deletions src/main/rnc-schema/textcorpus_0_4.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,11 @@ element textSource {
# This should be set to the mime type of the source content.
#
# For TEI documents, the follwoing guidelines apply.
# type=""application/tei+xml" - default
# type=""application/tei+xml; tokenized=no" : non-tokenized
# type=""application/tei+xml; tokenized=0" : non-tokenized
# type=""application/tei+xml; tokenized=yes" : tokenized
# type=""application/tei+xml; tokenized=1" : tokenized
# type="application/tei+xml" - default
# type="application/tei+xml; tokenized=no" : non-tokenized
# type="application/tei+xml; tokenized=0" : non-tokenized
# type="application/tei+xml; tokenized=yes" : tokenized
# type="application/tei+xml; tokenized=1" : tokenized
attribute type { xsd:string },
# actual source content, supplied as external reference
attribute extref { xsd:anyURI}?,
Expand Down

0 comments on commit d650c7f

Please sign in to comment.