diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-15 22:55:04 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-15 22:55:04 +0100 |
commit | c566d4efb57b697159f88d3bcfb7170bc7699fb0 (patch) | |
tree | ead8ef3f06495744302f815f8590131fcfe52737 /testdata/xmlparser | |
parent | fabb174fd15d129e6b8d668cd3d621b0b9481c4f (diff) |
Moved testdata path
Diffstat (limited to 'testdata/xmlparser')
-rw-r--r-- | testdata/xmlparser/affiliation.osxml | 10 | ||||
-rw-r--r-- | testdata/xmlparser/bibliography_domain.osxml | 26 | ||||
-rw-r--r-- | testdata/xmlparser/book_domain.osxml | 98 | ||||
-rw-r--r-- | testdata/xmlparser/color.osxml | 18 | ||||
-rw-r--r-- | testdata/xmlparser/comments_domain.osxml | 40 | ||||
-rw-r--r-- | testdata/xmlparser/complex_book.oxd | 106 | ||||
-rw-r--r-- | testdata/xmlparser/email.osxml | 8 | ||||
-rw-r--r-- | testdata/xmlparser/generic.osxml | 37 | ||||
-rw-r--r-- | testdata/xmlparser/headings_domain.osxml | 33 | ||||
-rw-r--r-- | testdata/xmlparser/lists_domain.osxml | 26 | ||||
-rw-r--r-- | testdata/xmlparser/meta_domain.osxml | 35 | ||||
-rw-r--r-- | testdata/xmlparser/mismatchedTag.osxml | 2 | ||||
-rw-r--r-- | testdata/xmlparser/simple_book.oxd | 18 | ||||
-rw-r--r-- | testdata/xmlparser/test.osxml | 15 | ||||
-rw-r--r-- | testdata/xmlparser/version.osxml | 8 |
15 files changed, 0 insertions, 480 deletions
diff --git a/testdata/xmlparser/affiliation.osxml b/testdata/xmlparser/affiliation.osxml deleted file mode 100644 index d84dc30..0000000 --- a/testdata/xmlparser/affiliation.osxml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<typesystem name="affiliation"> - <struct name="affiliation"> - <field name="workgroup" type="string"/> - <field name="departement" type="string"/> - <field name="institution" type="string"/> - </struct> - - <constant name="citec.sc" type="affiliation" value="[workgroup=Semantic Computing Group,departement=Center of Excellence Cognitive Interaction Technology (CITEC), institution=Bielefeld University]"/> -</typesystem> diff --git a/testdata/xmlparser/bibliography_domain.osxml b/testdata/xmlparser/bibliography_domain.osxml deleted file mode 100644 index f1d25f8..0000000 --- a/testdata/xmlparser/bibliography_domain.osxml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<domain name="bibliography"> - - <import rel="domain" src="./book_domain.oxm"/> - <import rel="domain" src="./meta_domain.oxm"/> - - <struct name="bibliography" transparent="true"> - <field> - <childRef ref="bibEntry"/> - </field> - <parentRef ref="book"> - <field name="bibliography" isSubtree="true"/> - </parentRef> - </struct> - <struct name="bibEntry"> - <field name="authors" optional="true"> - <childRef ref="meta.author"/> - </field> - <primitive name="name" type="string" isSubtree="true"/> - <primitive name="year" type="int" isSubtree="true"/> - <primitive name="journal" type="string" isSubtree="true" optional="true"/> - <primitive name="pages" type="cardinality" isSubtree="true" optional="true"/> - <!-- Here a geographical enum or something would be more exact --> - <primitive name="location" type="string" isSubtree="true" optional="true"/> - </struct> -</domain> diff --git a/testdata/xmlparser/book_domain.osxml b/testdata/xmlparser/book_domain.osxml deleted file mode 100644 index 4218915..0000000 --- a/testdata/xmlparser/book_domain.osxml +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<!-- The domain node is the root node of a single domain definition --> -<domain name="book"> - <!-- We start by declaring the structured classes. This implicitly defines - a context free grammar, which specifies the language of documents that - may be constructed using this domain. Note that this grammar may be - influenced by other domains depending on this one. --> - <!-- Note that we specify neither attributes, - nor parent, nor transparency, meaning that we refer to the default - values. Also note that we need to specify explicitly, which classes - are allowed as root nodes. --> - <struct name="book" cardinality="{1}" isRoot="true"> - <!-- implicitly: - <struct name="book" cardinality="{1}" isRoot="true" - transparent="false" isa="" attributesDescriptor=""> - --> - <!-- Note that we assume that, if not specified, a - field is assumed to have no name, be of type TREE - and not optional. --> - <field> - <!-- implicitly: - <field name="" isSubtree="false" optional="false"> - --> - <!-- Using such child references might be problematic if - multiple nodes are matched. This should probably - result in an exception. - Also note that we only reference the child classes. - We do _not_ declare them here. This might lead to - some difficulties in the parsing process as I - effectively use forward declarations here. So the - resolve() process may only be started _after_ all - delcarations are read. --> - <childRef ref="book.chapter"/> - <!-- The dot notation as path separator might be changed - but I think it to be intuitive. If we want a more - CSS like style we can use whitespaces here. --> - <childRef ref="book.paragraph"/> - </field> - </struct> - <struct name="chapter"> - <!-- implicitly: - <struct name="chapter" isRoot="false" cardinality="{*}" - transparent="false" isa="" attributesDescriptor=""> - --> - <field> - <!-- implicitly: - <field name="" isSubtree="false" optional="false"> - --> - <childRef ref="book.section"/> - <childRef ref="book.paragraph"/> - </field> - </struct> - <struct name="section"> - <!-- implicitly: - <struct name="section" isRoot="false" cardinality="{*}" - transparent="false" isa="" attributesDescriptor=""> - --> - <field> - <!-- implicitly: - <field name="" isSubtree="false" optional="false"> - --> - <childRef ref="book.subsection"/> - <childRef ref="book.paragraph"/> - </field> - </struct> - <struct name="subsection"> - <!-- implicitly: - <struct name="subsection" isRoot="false" cardinality="{*}" - transparent="false" isa="" attributesDescriptor=""> - --> - <field> - <!-- implicitly: - <field name="" isSubtree="false" optional="false"> - --> - <childRef ref="book.paragraph"/> - </field> - </struct> - <struct name="paragraph" transparent="true" role="paragraph"> - <!-- implicitly: - <struct name="subsection" isRoot="false" cardinality="{*}" - transparent="true" isa="" attributesDescriptor=""> - --> - <field> - <!-- implicitly: - <field name="" type="TREE" optional="false"> - --> - <childRef ref="book.text"/> - </field> - </struct> - <struct name="text" transparent="true" role="text"> - <!-- implicitly: - <struct name="text" isRoot="false" cardinality="{*}" - transparent="true" isa="" attributesDescriptor=""> - --> - <!-- we might want to specify std.string here --> - <primitive type="string"/> - </struct> -</domain> diff --git a/testdata/xmlparser/color.osxml b/testdata/xmlparser/color.osxml deleted file mode 100644 index 17adea4..0000000 --- a/testdata/xmlparser/color.osxml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<typesystem name="color"> - <struct name="color"> - <field name="r" type="int"/> - <field name="g" type="int"/> - <field name="b" type="int"/> - </struct> - - <constant name="aquamarine1" type="color" value="[127,255,212]"/> - <constant name="aquamarine2" type="color" value="[118,238,198]"/> - <constant name="aquamarine3" type="color" value="[102,205,170]"/> - <constant name="aquamarine" type="color" value="[127,255,212]"/> - <constant name="azure1" type="color" value="[240,255,255]"/> - <constant name="azure2" type="color" value="[224,238,238]"/> - <constant name="azure3" type="color" value="[193,205,205]"/> - <constant name="azure4" type="color" value="[131,139,139]"/> - <constant name="azure" type="color" value="[240,255,255]"/> -</typesystem> diff --git a/testdata/xmlparser/comments_domain.osxml b/testdata/xmlparser/comments_domain.osxml deleted file mode 100644 index 6add2b3..0000000 --- a/testdata/xmlparser/comments_domain.osxml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<domain name="comments"> - <import rel="domain" src="./book_domain.oxm"/> - - <!-- an annotation comment --> - <annotation name="comment"> - <field name="replies" isSubtree="true"> - <childRef ref="reply"/> - </field> - <field name="content"> - <childRef ref="book.paragraph"/> - </field> - </annotation> - - <!-- an point-like structure comment. --> - <struct name="comment"> - <!-- Is there a chance to prevent users from having to redefine these - two fields in comment and reply? Could we use a fieldRef here? - Or would that be circular? --> - <field name="replies" isSubtree="true"> - <childRef ref="reply"/> - </field> - <field name="content"> - <childRef ref="book.paragraph"/> - </field> - <parentRef ref="book.paragraph"> - <fieldRef ref="$default"/> - </parentRef> - </struct> - <!-- note that replies are organized in a tree fashion: One can also reply - to a reply --> - <struct name="reply"> - <field name="replies" isSubtree="true"> - <childRef ref="reply"/> - </field> - <field name="content"> - <childRef ref="book.paragraph"/> - </field> - </struct> -</domain> diff --git a/testdata/xmlparser/complex_book.oxd b/testdata/xmlparser/complex_book.oxd deleted file mode 100644 index 7d69713..0000000 --- a/testdata/xmlparser/complex_book.oxd +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0"?> -<document> - - <import rel="domain" src="./book_domain.oxm"/> - <import rel="domain" src="./headings_domain.oxm"/> - <import rel="domain" src="./meta_domain.oxm"/> - <import rel="domain" src="./bibliography_domain.oxm"/> - <!--<import rel="domain" src="emphasis.oxm"/> - <import rel="domain" src="comments.oxm"/> - <import rel="domain" src="lists.oxm"/> - <alias tag="paragraph" aka="p"/> - <alias tag="emphasized" aka="em"/>--> - - <book> - <meta> - <primaryAuthor> - <firstName>Immanuel</firstName> - <lastName>Kant</lastName> - <email>[ikant,philo.albertus-koenigsberg,de]</email> - <affiliation>[Logic and Metaphysics, Faculty of Philosophy, Albertus-University Königsberg]</affiliation> - </primaryAuthor> - <!-- Using this version tag leads to a very interesting bug: - A new transparent meta element gets created for it. Because only - one meta tag is allowed this leads to an error. So what to do? - - <version>[1,0,0]</version> --> - </meta> - - <heading> - Beantwortung der Frage: Was ist Aufklärung? - </heading> - - <chapter name="content"> - <heading>Was ist Aufklärung?</heading> - - Aufklärung ist der Ausgang des Menschen aus seiner - selbstverschuldeten Unmündigkeit. Unmündigkeit ist - das Unvermögen, sich seines Verstandes ohne Leitung eines anderen zu - bedienen. Selbstverschuldet ist diese Unmündigkeit, wenn - die Ursache derselben nicht am Mangel des Verstandes, sondern der - Entschließung und des Mutes liegt, sich seiner ohne Leitung eines - andern zu bedienen. - Sapere aude! Habe Mut, dich deines eigenen Verstandes zu - bedienen! ist also der Wahlspruch der Aufklärung. - </chapter> - - <bibliography> - <bibEntry> - <name>Dezember-Heft</name> - <journal>Berlinische Monatsschrift</journal> - <year>1784</year> - <pages>{481-494}</pages> - </bibEntry> - <bibEntry> - <name>Kleine Schriften</name> - <primaryAuthor> - <firstName>Immanuel</firstName> - <lastName>Kant</lastName> - </primaryAuthor> - <year>1793</year> - <pages>{34-50}</pages> - <location>Neuwied</location> - </bibEntry> - <bibEntry> - <name>Zerstreute Aufsätze</name> - <primaryAuthor> - <firstName>Immanuel</firstName> - <lastName>Kant</lastName> - </primaryAuthor> - <year>1793</year> - <pages>{25-37}</pages> - <location>Frankfurt und Leipzig</location> - </bibEntry> - <bibEntry> - <name>Sämmtliche kleine Schriften</name> - <primaryAuthor> - <firstName>Immanuel</firstName> - <lastName>Kant</lastName> - </primaryAuthor> - <year>1798</year> - <pages>{159-172}</pages> - <location>Königsberg u. Leipzig</location> - </bibEntry> - <bibEntry> - <name>I. Kant's vermischte Schriften</name> - <primaryAuthor> - <firstName>Immanuel</firstName> - <lastName>Kant</lastName> - </primaryAuthor> - <year>1799</year> - <pages>{687-700}</pages> - <location>Halle</location> - </bibEntry> - <bibEntry> - <name>Vorzügliche kleine Schriften und Aufsätze</name> - <primaryAuthor> - <firstName>Immanuel</firstName> - <lastName>Kant</lastName> - </primaryAuthor> - <year>1833</year> - <pages>{75-84}</pages> - <location>Leipzig</location> - </bibEntry> - </bibliography> - </book> -</document> diff --git a/testdata/xmlparser/email.osxml b/testdata/xmlparser/email.osxml deleted file mode 100644 index 325f89a..0000000 --- a/testdata/xmlparser/email.osxml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<typesystem name="email"> - <struct name="email"> - <field name="local" type="string"/> - <field name="domainName" type="string"/> - <field name="domainSuffix" type="string"/> - </struct> -</typesystem> diff --git a/testdata/xmlparser/generic.osxml b/testdata/xmlparser/generic.osxml deleted file mode 100644 index 45803c8..0000000 --- a/testdata/xmlparser/generic.osxml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<typesystem name="border"> - <import>./color.oxm</import> - - <enum name="border-style"> - <entry>none</entry> - <entry>dotted</entry> - <entry>dashed</entry> - <entry>solid</entry> - <entry>double</entry> - <entry>groove</entry> - <entry>ridge</entry> - <entry>inset</entry> - <entry>outset</entry> - </enum> - - <constant name="zero" value="0" type="int" /> - <constant name="black" value="[zero, zero, zero]" type="color" /> - - <struct name="border"> - <field name="style" type="border-style"/> - <field name="color" type="color" default="black" /> - </struct> - - <constant name="beautifulBorder" type="border" value="[color=aquamarine,style=solid]" /> - <constant name="moreBeautifulBorder" type="border" value="[dotted, azure]" /> -</typesystem> -<!--<domain name="color"> - <struct name="bla" cardinality="{1,2}" isa="blub"/> - <struct name="blub" cardinality="{1-3,5,>7}"> - <fields> - <field></field> - <primitive type="bla"/> - </fields> - </struct> -</domain>--> - diff --git a/testdata/xmlparser/headings_domain.osxml b/testdata/xmlparser/headings_domain.osxml deleted file mode 100644 index d421747..0000000 --- a/testdata/xmlparser/headings_domain.osxml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<domain name="headings"> - - <import rel="domain" src="./book_domain.oxm"/> - - <struct name="heading" cardinality="1" transparent="true"> - <!-- The parent mechanism is a curious thing. Remind yourself - that parent-child-relationship in this sense are mediated - by fields. So we must either reference a field that is - already there or declare a new one on the fly. --> - <parentRef ref="book.book"> - <field name="heading" isSubtree="true" optional="true"/> - </parentRef> - <parentRef ref="book.chapter"> - <field name="heading" isSubtree="true" optional="true"/> - </parentRef> - <parentRef ref="book.section"> - <field name="heading" isSubtree="true" optional="true"/> - </parentRef> - <parentRef ref="book.subsection"> - <field name="heading" isSubtree="true" optional="true"/> - </parentRef> - <parentRef ref="book.paragraph"> - <field name="heading" isSubtree="true" optional="true"/> - </parentRef> - <!-- regarding its fields we have a problem here. We do not want to - declare a new field, because in fact we want to allow every - bit of content that a paragraph would allow - also considering - possible extensions of paragraph by other domains. - So we need to reference the default field of paragraph. --> - <fieldRef ref="book.paragraph.$default"/> - </struct> -</domain> diff --git a/testdata/xmlparser/lists_domain.osxml b/testdata/xmlparser/lists_domain.osxml deleted file mode 100644 index 4360a6d..0000000 --- a/testdata/xmlparser/lists_domain.osxml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<domain name="lists"> - <import rel="domain" src="book.oxm"/> - - <struct name="ul" isa="book.paragraph"> - <!-- Here we solve the problem of parents using the isa - mechanism, because a list may occur whereever a paragraph - may occur. However we do want to override the default field. --> - <field> - <childRef name="item"/> - </field> - </struct> - <struct name="ol" isa="book.paragraph"> - <!-- Here we solve the problem of parents using the isa - mechanism, because a list may occur whereever a paragraph - may occur. However we do want to override the default field. --> - <field> - <childRef name="item"/> - </field> - </struct> - <struct name="item"> - <field> - <childRef name="book.paragaph"/> - </field> - </struct> -</domain> diff --git a/testdata/xmlparser/meta_domain.osxml b/testdata/xmlparser/meta_domain.osxml deleted file mode 100644 index ffb5413..0000000 --- a/testdata/xmlparser/meta_domain.osxml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<domain name="meta"> - - <import rel="typesystem" src="./affiliation.oxm"/> - <import rel="typesystem" src="./email.oxm"/> - <import rel="typesystem" src="./version.oxm"/> - <import rel="domain" src="./book_domain.oxm"/> - - <struct name="meta" cardinality="{1}" transparent="true"> - <field name="authors"> - <childRef ref="author"/> - <childRef ref="version"/> - </field> - <parentRef ref="book"> - <field name="meta" isSubtree="true" optional="true"/> - </parentRef> - <parentRef ref="chapter"> - <field name="meta" isSubtree="true" optional="true"/> - </parentRef> - <!-- One could also include "article" and other things here --> - </struct> - <!-- no explicit cardinality, because we might have multiple authors --> - <struct name="author"> - <primitive isSubtree="true" name="firstName" type="string"/> - <primitive isSubtree="true" name="lastName" type="string"/> - <primitive isSubtree="true" name="email" type="email" optional="true"/> - <primitive isSubtree="true" name="affiliation" type="affiliation" optional="true"/> - </struct> - <!-- but we need at least one primary author --> - <struct name="primaryAuthor" cardinality="{>0}" isa="author"/> - <!-- version intermediate struct --> - <struct name="version" cardinality="{0-1}"> - <primitive type="version"/> - </struct> -</domain> diff --git a/testdata/xmlparser/mismatchedTag.osxml b/testdata/xmlparser/mismatchedTag.osxml deleted file mode 100644 index 5dc9388..0000000 --- a/testdata/xmlparser/mismatchedTag.osxml +++ /dev/null @@ -1,2 +0,0 @@ -<document></document2> - diff --git a/testdata/xmlparser/simple_book.oxd b/testdata/xmlparser/simple_book.oxd deleted file mode 100644 index abf575f..0000000 --- a/testdata/xmlparser/simple_book.oxd +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<document> - <import rel="domain" src="book_domain.oxm"/> - <book> - This might be some introductory text or a dedication. - <!-- Note that a better version of the book domain might specify - headings here. --> - <chapter name="myFirstChapter"> - Here we might have an introduction to the chapter. - <section name="myFirstSection"> - Here we might find the actual section content. - </section> - <section name="mySndSection"> - Here we might find the actual section content. - </section> - </chapter> - </book> -</document> diff --git a/testdata/xmlparser/test.osxml b/testdata/xmlparser/test.osxml deleted file mode 100644 index 911bbed..0000000 --- a/testdata/xmlparser/test.osxml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<domain name="test"> - - <import rel="domain" src="./book_domain.oxm"/> - <import rel="typesystem" src="./color.oxm"/> - - <struct name="fancycolor"> - - <primitive type="color"/> - - <parentRef ref="book.book"> - <fieldRef ref="$default"/> - </parentRef> - </struct> -</domain> diff --git a/testdata/xmlparser/version.osxml b/testdata/xmlparser/version.osxml deleted file mode 100644 index 0d52736..0000000 --- a/testdata/xmlparser/version.osxml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<typesystem name="version"> - <struct name="version"> - <field name="major" type="int"/> - <field name="minor" type="int"/> - <field name="patch" type="int"/> - </struct> -</typesystem> |