diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-03-03 15:17:51 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2015-03-03 15:17:51 +0100 |
commit | 78f24b65e4a84c528338cc52e71efa4aa58e656e (patch) | |
tree | 2a61cbdecae1f658999d226a9c9630bb90d9338c /testdata | |
parent | 466ff991bcfad76d78100193aacbfaf74d542b26 (diff) |
Renamed isSubtree to subtree and isRoot to root
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/osmlparser/explicit_fields.osml | 8 | ||||
-rw-r--r-- | testdata/osmlparser/include_recursive_root.osml | 2 | ||||
-rw-r--r-- | testdata/osmlparser/include_root.osml | 2 | ||||
-rw-r--r-- | testdata/osmlparser/inline_ontology.osml | 2 | ||||
-rw-r--r-- | testdata/osmlparser/invalid_explicit_fields.osml | 8 | ||||
-rw-r--r-- | testdata/osmlparser/rollback_on_invalid_element.osml | 4 | ||||
-rw-r--r-- | testdata/osmlparser/struct_with_no_field.osml | 2 | ||||
-rw-r--r-- | testdata/osmlparser/structure_inheritance.osml | 2 | ||||
-rw-r--r-- | testdata/osxmlparser/book_ontology.osxml | 65 | ||||
-rw-r--r-- | testdata/osxmlparser/comments_ontology.osxml | 6 | ||||
-rw-r--r-- | testdata/osxmlparser/headings_ontology.osxml | 10 |
11 files changed, 24 insertions, 87 deletions
diff --git a/testdata/osmlparser/explicit_fields.osml b/testdata/osmlparser/explicit_fields.osml index ea13c02..a83f46d 100644 --- a/testdata/osmlparser/explicit_fields.osml +++ b/testdata/osmlparser/explicit_fields.osml @@ -1,10 +1,10 @@ \document \ontology#test - \struct#a[isRoot=true] - \primitive#b[type=string,isSubtree=true] - \primitive#c[type=string,isSubtree=true] - \primitive#d[type=string,isSubtree=false] + \struct#a[root=true] + \primitive#b[type=string,subtree=true] + \primitive#c[type=string,subtree=true] + \primitive#d[type=string,subtree=false] \a{! diff --git a/testdata/osmlparser/include_recursive_root.osml b/testdata/osmlparser/include_recursive_root.osml index b29f1f4..14a56fd 100644 --- a/testdata/osmlparser/include_recursive_root.osml +++ b/testdata/osmlparser/include_recursive_root.osml @@ -1,7 +1,7 @@ \begin{document} \ontology#testOntology - \struct#test[isRoot=true] + \struct#test[root=true] \begin{test} \include{./include_recursive.osml} diff --git a/testdata/osmlparser/include_root.osml b/testdata/osmlparser/include_root.osml index 3c65ca1..b1256de 100644 --- a/testdata/osmlparser/include_root.osml +++ b/testdata/osmlparser/include_root.osml @@ -1,7 +1,7 @@ \begin{document} \ontology#testOntology - \struct#test[isRoot=true] + \struct#test[root=true] \field \childRef[ref=a] \childRef[ref=b] diff --git a/testdata/osmlparser/inline_ontology.osml b/testdata/osmlparser/inline_ontology.osml index 1bba1f6..e01a5be 100644 --- a/testdata/osmlparser/inline_ontology.osml +++ b/testdata/osmlparser/inline_ontology.osml @@ -1,7 +1,7 @@ \begin{document} \ontology#testOntology - \struct#test[isRoot=true] + \struct#test[root=true] \field \childRef[ref=a] \struct#a diff --git a/testdata/osmlparser/invalid_explicit_fields.osml b/testdata/osmlparser/invalid_explicit_fields.osml index eeecc0a..f41ee6f 100644 --- a/testdata/osmlparser/invalid_explicit_fields.osml +++ b/testdata/osmlparser/invalid_explicit_fields.osml @@ -1,10 +1,10 @@ \document \ontology#test - \struct#a[isRoot=true] - \primitive#b[type=string,isSubtree=true] - \primitive#c[type=string,isSubtree=true] - \primitive#d[type=string,isSubtree=false] + \struct#a[root=true] + \primitive#b[type=string, subtree=true] + \primitive#c[type=string, subtree=true] + \primitive#d[type=string, subtree=false] \a{! diff --git a/testdata/osmlparser/rollback_on_invalid_element.osml b/testdata/osmlparser/rollback_on_invalid_element.osml index 282e741..16fc629 100644 --- a/testdata/osmlparser/rollback_on_invalid_element.osml +++ b/testdata/osmlparser/rollback_on_invalid_element.osml @@ -1,14 +1,14 @@ \begin{document} \ontology#testOntology - \struct#test[isRoot=true] + \struct#test[root=true] \field \childRef[ref=a] \struct#a \field \childRef[ref=b] \struct#b - \primitive[type=string,optional=true] + \primitive[type=string, optional=true] \begin{test} \a{!} diff --git a/testdata/osmlparser/struct_with_no_field.osml b/testdata/osmlparser/struct_with_no_field.osml index 4f27998..7c8c09d 100644 --- a/testdata/osmlparser/struct_with_no_field.osml +++ b/testdata/osmlparser/struct_with_no_field.osml @@ -1,7 +1,7 @@ \document \ontology#test - \struct#a[isRoot=true] + \struct#a[root=true] \field \childRef[ref=b] \struct#b diff --git a/testdata/osmlparser/structure_inheritance.osml b/testdata/osmlparser/structure_inheritance.osml index 008778a..2dc0b58 100644 --- a/testdata/osmlparser/structure_inheritance.osml +++ b/testdata/osmlparser/structure_inheritance.osml @@ -2,5 +2,5 @@ \struct#a \primitive[type=string] \struct#b[isa=a] - \primitive#color[type=string,isSubtree=true] + \primitive#color[type=string, subtree=true] diff --git a/testdata/osxmlparser/book_ontology.osxml b/testdata/osxmlparser/book_ontology.osxml index 0b393e6..2c615ca 100644 --- a/testdata/osxmlparser/book_ontology.osxml +++ b/testdata/osxmlparser/book_ontology.osxml @@ -1,98 +1,35 @@ <?xml version="1.0" standalone="yes"?> <!-- The ontology node is the root node of a single ontology definition --> <ontology 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 ontology. Note that this grammar may be - influenced by other ontologies 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. --> + <struct name="book" cardinality="{1}" root="true"> <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"> - <!-- 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"> - <!-- implicitly: - <struct name="text" isRoot="false" cardinality="{*}" - transparent="true" isa="" attributesDescriptor=""> - --> - <!-- we might want to specify std.string here --> <primitive type="string"/> </struct> </ontology> diff --git a/testdata/osxmlparser/comments_ontology.osxml b/testdata/osxmlparser/comments_ontology.osxml index f2423be..34185d8 100644 --- a/testdata/osxmlparser/comments_ontology.osxml +++ b/testdata/osxmlparser/comments_ontology.osxml @@ -4,7 +4,7 @@ <!-- an annotation comment --> <annotation name="comment"> - <field name="replies" isSubtree="true"> + <field name="replies" subtree="true"> <childRef ref="reply"/> </field> <field name="content"> @@ -17,7 +17,7 @@ <!-- 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"> + <field name="replies" subtree="true"> <childRef ref="reply"/> </field> <field name="content"> @@ -30,7 +30,7 @@ <!-- note that replies are organized in a tree fashion: One can also reply to a reply --> <struct name="reply"> - <field name="replies" isSubtree="true"> + <field name="replies" subtree="true"> <childRef ref="reply"/> </field> <field name="content"> diff --git a/testdata/osxmlparser/headings_ontology.osxml b/testdata/osxmlparser/headings_ontology.osxml index 413eaa9..56c9e7d 100644 --- a/testdata/osxmlparser/headings_ontology.osxml +++ b/testdata/osxmlparser/headings_ontology.osxml @@ -9,19 +9,19 @@ 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"/> + <field name="heading" subtree="true" optional="true"/> </parentRef> <parentRef ref="book.chapter"> - <field name="heading" isSubtree="true" optional="true"/> + <field name="heading" subtree="true" optional="true"/> </parentRef> <parentRef ref="book.section"> - <field name="heading" isSubtree="true" optional="true"/> + <field name="heading" subtree="true" optional="true"/> </parentRef> <parentRef ref="book.subsection"> - <field name="heading" isSubtree="true" optional="true"/> + <field name="heading" subtree="true" optional="true"/> </parentRef> <parentRef ref="book.paragraph"> - <field name="heading" isSubtree="true" optional="true"/> + <field name="heading" subtree="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 |