Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support aliases for XML Schema datatypes #101

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Datatypes.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

/*
* Custom types used to generate the XML Schema. This format is actually
* XML Schema using a Groovy MarkupBuilder
*/
Datatypes {
simpleType('list_uri', 'List of URI') {
restriction {
simpleType {
list itemType:'xs:anyURI'
}
}
}
simpleType('string_list') {
alias "List of String"
alias 'List of Strings'
restriction {
simpleType {
list itemType:'xs:string'
}
}
}
complexType('morphology') {
sequence {
element name:'majorWordClass', type:'xs:string'
element name:'wordClass', type:'xs:string'
element name:'prefix', type:'xs:string'
element name:'suffix', type:'xs:string'
element name:'number', type:'xs:string'
element name:'person', type:'xs:string'
element name:'syntax', type:'xs:string'
element name:'tense', type:'xs:string'
}
}
}

Binary file modified bin/vocab-1.5.0-SNAPSHOT.jar
Binary file not shown.
40 changes: 4 additions & 36 deletions lapps.vocabulary
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
schema="http://schema.org"
iso="http://www.isocat.org/datcat"

include "Datatypes.schema"

/*
version='1.2.9-SNAPSHOT'
File versionFile = new File('VERSION')
Expand Down Expand Up @@ -47,7 +49,7 @@ Annotation {
sameAs "$iso/DC-2318"
metadata {
producer {
type XSD.list_uri
type 'List of URI'
description "The software that produced the annotations."
}
rules {
Expand Down Expand Up @@ -77,7 +79,7 @@ Region {
property."""
properties {
targets {
type XSD.list_uri
type 'List of URI'
description """IDs of a sequence of annotations covering the region of primary data referred to by this annotation. Used as an alternative to <em>start</em> and <em>end</em> to point to component annotations (e.g., a token sequence) rather than directly into primary data, or to link two or more annotations."""
}
start {
Expand Down Expand Up @@ -609,37 +611,3 @@ AudioDocument {
definition "Any electronic media content consisting of audio (language). An audio document may consist of several physical computer files."
parent "Document"
}

/*
* Custom types used to generate the XML Schema. This format is actually
* XML Schema using a Groovy MarkupBuilder
*/
Datatypes {
simpleType('list_uri') {
restriction {
simpleType {
list itemType:'xs:anyURI'
}
}
}
simpleType('string_list') {
restriction {
simpleType {
list itemType:'xs:string'
}
}
}
complexType('morphology') {
sequence {
element name:'majorWordClass', type:'xs:string'
element name:'wordClass', type:'xs:string'
element name:'prefix', type:'xs:string'
element name:'suffix', type:'xs:string'
element name:'number', type:'xs:string'
element name:'person', type:'xs:string'
element name:'syntax', type:'xs:string'
element name:'tense', type:'xs:string'
}
}
}