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 | |
parent | 466ff991bcfad76d78100193aacbfaf74d542b26 (diff) |
Renamed isSubtree to subtree and isRoot to root
-rw-r--r-- | data/ontology/bibliography.osxml | 2 | ||||
-rw-r--r-- | data/ontology/book.osxml | 2 | ||||
-rw-r--r-- | data/ontology/comments.osxml | 6 | ||||
-rw-r--r-- | data/ontology/headings.osxml | 10 | ||||
-rw-r--r-- | data/ontology/meta.osxml | 14 | ||||
-rw-r--r-- | src/core/model/Ontology.cpp | 12 | ||||
-rw-r--r-- | src/core/model/Syntax.cpp | 4 | ||||
-rw-r--r-- | src/core/parser/stack/OntologyHandler.cpp | 38 | ||||
-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 |
19 files changed, 68 insertions, 131 deletions
diff --git a/data/ontology/bibliography.osxml b/data/ontology/bibliography.osxml index e133a2b..3de3e83 100644 --- a/data/ontology/bibliography.osxml +++ b/data/ontology/bibliography.osxml @@ -9,7 +9,7 @@ <childRef ref="bibEntry"/> </field> <parentRef ref="book"> - <field name="bibliography" isSubtree="true"/> + <field name="bibliography" subtree="true"/> </parentRef> </struct> <struct name="bibEntry"> diff --git a/data/ontology/book.osxml b/data/ontology/book.osxml index 41dc788..3bd06b9 100644 --- a/data/ontology/book.osxml +++ b/data/ontology/book.osxml @@ -1,6 +1,6 @@ <?xml version="1.0" standalone="yes"?> <ontology name="book"> - <struct name="book" cardinality="{1}" isRoot="true"> + <struct name="book" cardinality="{1}" root="true"> <field> <childRef ref="book.chapter"/> <childRef ref="book.paragraph"/> diff --git a/data/ontology/comments.osxml b/data/ontology/comments.osxml index 621fe1c..97d152c 100644 --- a/data/ontology/comments.osxml +++ b/data/ontology/comments.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/data/ontology/headings.osxml b/data/ontology/headings.osxml index 1319306..9e164d6 100644 --- a/data/ontology/headings.osxml +++ b/data/ontology/headings.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 diff --git a/data/ontology/meta.osxml b/data/ontology/meta.osxml index 6b25305..c03541a 100644 --- a/data/ontology/meta.osxml +++ b/data/ontology/meta.osxml @@ -13,20 +13,20 @@ <childRef ref="version"/> </field> <parentRef ref="book"> - <field name="meta" isSubtree="true" optional="true"/> + <field name="meta" subtree="true" optional="true"/> </parentRef> <parentRef ref="chapter"> - <field name="meta" isSubtree="true" optional="true"/> + <field name="meta" subtree="true" optional="true"/> </parentRef> <!-- One could also include "article" and other things here --> </struct> <struct name="person"> - <primitive isSubtree="true" name="firstName" type="string"/> - <primitive isSubtree="true" name="secondNames" type="string[]" optional="true"/> - <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"/> + <primitive subtree="true" name="firstName" type="string"/> + <primitive subtree="true" name="secondNames" type="string[]" optional="true"/> + <primitive subtree="true" name="lastName" type="string"/> + <primitive subtree="true" name="email" type="email" optional="true"/> + <primitive subtree="true" name="affiliation" type="affiliation" optional="true"/> </struct> <!-- wrapper author tag to allow specifying no authors whatsoever. But if diff --git a/src/core/model/Ontology.cpp b/src/core/model/Ontology.cpp index 3af727d..f52f8ca 100644 --- a/src/core/model/Ontology.cpp +++ b/src/core/model/Ontology.cpp @@ -232,7 +232,7 @@ static NodeVector<Node> collect(const Node *start, F match) } static std::vector<SyntaxDescriptor> collectPermittedTokens( - const Node *start, Handle<Domain> domain) + const Node *start, Handle<Ontology> ontology) { // gather SyntaxDescriptors for structure children first. std::vector<SyntaxDescriptor> res; @@ -250,7 +250,7 @@ static std::vector<SyntaxDescriptor> collectPermittedTokens( return false; }); // gather SyntaxDescriptors for AnnotationClasses. - for (auto a : domain->getAnnotationClasses()) { + for (auto a : ontology->getAnnotationClasses()) { SyntaxDescriptor stx = a->getSyntaxDescriptor(); if (!stx.isEmpty()) { res.push_back(stx); @@ -462,7 +462,7 @@ std::vector<SyntaxDescriptor> FieldDescriptor::getPermittedTokens() const return std::vector<SyntaxDescriptor>(); } return collectPermittedTokens( - this, getParent().cast<Descriptor>()->getParent().cast<Domain>()); + this, getParent().cast<Descriptor>()->getParent().cast<Ontology>()); } /* Class Descriptor */ @@ -762,7 +762,7 @@ std::vector<SyntaxDescriptor> Descriptor::getPermittedTokens() const if (getParent() == nullptr) { return std::vector<SyntaxDescriptor>(); } - return collectPermittedTokens(this, getParent().cast<Domain>()); + return collectPermittedTokens(this, getParent().cast<Ontology>()); } /* Class StructuredClass */ @@ -1092,7 +1092,7 @@ static void gatherTokenDescriptors( } } -std::vector<TokenDescriptor *> Domain::getAllTokenDescriptors() const +std::vector<TokenDescriptor *> Ontology::getAllTokenDescriptors() const { std::vector<TokenDescriptor *> res; // note all fields that are already visited because FieldReferences might @@ -1129,4 +1129,4 @@ const Rtti Ontology = RttiBuilder<ousia::Ontology>("Ontology") .parent(&RootNode) .composedOf({&StructuredClass, &AnnotationClass}); } -}
\ No newline at end of file +} diff --git a/src/core/model/Syntax.cpp b/src/core/model/Syntax.cpp index 9dbaccc..bd17bff 100644 --- a/src/core/model/Syntax.cpp +++ b/src/core/model/Syntax.cpp @@ -18,7 +18,7 @@ #include "Syntax.hpp" -#include "Domain.hpp" +#include "Ontology.hpp" namespace ousia { @@ -55,4 +55,4 @@ bool SyntaxDescriptor::isEmpty() const return start == Tokens::Empty && end == Tokens::Empty && shortForm == Tokens::Empty; } -}
\ No newline at end of file +} diff --git a/src/core/parser/stack/OntologyHandler.cpp b/src/core/parser/stack/OntologyHandler.cpp index 3b3b386..4474589 100644 --- a/src/core/parser/stack/OntologyHandler.cpp +++ b/src/core/parser/stack/OntologyHandler.cpp @@ -33,7 +33,7 @@ namespace parser_stack { /* OntologyHandler */ -bool DomainHandler::startCommand(Variant::mapType &args) +bool OntologyHandler::startCommand(Variant::mapType &args) { // Create the Ontology node Rooted<Ontology> ontology = @@ -57,7 +57,7 @@ void OntologyHandler::end() { scope().pop(logger()); } /* OntologyStructHandler */ -bool OntologyStructHandler::start(Variant::mapType &args) +bool OntologyStructHandler::startCommand(Variant::mapType &args) { scope().setFlag(ParserFlag::POST_HEAD, true); @@ -65,7 +65,7 @@ bool OntologyStructHandler::start(Variant::mapType &args) Rooted<StructuredClass> structuredClass = ontology->createStructuredClass( args["name"].asString(), args["cardinality"].asCardinality(), nullptr, - args["transparent"].asBool(), args["isRoot"].asBool()); + args["transparent"].asBool(), args["root"].asBool()); structuredClass->setLocation(location()); const std::string &isa = args["isa"].asString(); @@ -88,7 +88,7 @@ bool OntologyStructHandler::start(Variant::mapType &args) void OntologyStructHandler::end() { scope().pop(logger()); } /* OntologyAnnotationHandler */ -bool OntologyAnnotationHandler::start(Variant::mapType &args) +bool OntologyAnnotationHandler::startCommand(Variant::mapType &args) { scope().setFlag(ParserFlag::POST_HEAD, true); @@ -106,7 +106,7 @@ void OntologyAnnotationHandler::end() { scope().pop(logger()); } /* OntologyAttributesHandler */ -bool OntologyAttributesHandler::start(Variant::mapType &args) +bool OntologyAttributesHandler::startCommand(Variant::mapType &args) { // Fetch the current typesystem and create the struct node Rooted<Descriptor> parent = scope().selectOrThrow<Descriptor>(); @@ -122,10 +122,10 @@ void OntologyAttributesHandler::end() { scope().pop(logger()); } /* OntologyFieldHandler */ -bool OntologyFieldHandler::start(Variant::mapType &args) +bool OntologyFieldHandler::startCommand(Variant::mapType &args) { FieldDescriptor::FieldType type; - if (args["isSubtree"].asBool()) { + if (args["subtree"].asBool()) { type = FieldDescriptor::FieldType::SUBTREE; } else { type = FieldDescriptor::FieldType::TREE; @@ -152,7 +152,7 @@ void OntologyFieldHandler::end() { scope().pop(logger()); } /* OntologyFieldRefHandler */ -bool OntologyFieldRefHandler::start(Variant::mapType &args) +bool OntologyFieldRefHandler::startCommand(Variant::mapType &args) { Rooted<Descriptor> parent = scope().selectOrThrow<Descriptor>(); @@ -182,12 +182,12 @@ void OntologyFieldRefHandler::end() {} /* OntologyPrimitiveHandler */ -bool OntologyPrimitiveHandler::start(Variant::mapType &args) +bool OntologyPrimitiveHandler::startCommand(Variant::mapType &args) { Rooted<Descriptor> parent = scope().selectOrThrow<Descriptor>(); FieldDescriptor::FieldType fieldType; - if (args["isSubtree"].asBool()) { + if (args["subtree"].asBool()) { fieldType = FieldDescriptor::FieldType::SUBTREE; } else { fieldType = FieldDescriptor::FieldType::TREE; @@ -222,7 +222,7 @@ void OntologyPrimitiveHandler::end() { scope().pop(logger()); } /* OntologyChildHandler */ -bool OntologyChildHandler::start(Variant::mapType &args) +bool OntologyChildHandler::startCommand(Variant::mapType &args) { Rooted<FieldDescriptor> field = scope().selectOrThrow<FieldDescriptor>(); @@ -240,7 +240,7 @@ bool OntologyChildHandler::start(Variant::mapType &args) /* OntologyParentHandler */ -bool OntologyParentHandler::start(Variant::mapType &args) +bool OntologyParentHandler::startCommand(Variant::mapType &args) { Rooted<StructuredClass> strct = scope().selectOrThrow<StructuredClass>(); @@ -255,11 +255,11 @@ void OntologyParentHandler::end() { scope().pop(logger()); } /* OntologyParentFieldHandler */ -bool OntologyParentFieldHandler::start(Variant::mapType &args) +bool OntologyParentFieldHandler::startCommand(Variant::mapType &args) { Rooted<OntologyParent> parentNameNode = scope().selectOrThrow<OntologyParent>(); FieldDescriptor::FieldType type; - if (args["isSubtree"].asBool()) { + if (args["subtree"].asBool()) { type = FieldDescriptor::FieldType::SUBTREE; } else { type = FieldDescriptor::FieldType::TREE; @@ -288,7 +288,7 @@ bool OntologyParentFieldHandler::start(Variant::mapType &args) /* OntologyParentFieldRefHandler */ -bool OntologyParentFieldRefHandler::start(Variant::mapType &args) +bool OntologyParentFieldRefHandler::startCommand(Variant::mapType &args) { Rooted<OntologyParent> parentNameNode = scope().selectOrThrow<OntologyParent>(); @@ -330,7 +330,7 @@ const State OntologyStruct = .elementHandler(OntologyStructHandler::create) .arguments({Argument::String("name"), Argument::Cardinality("cardinality", Cardinality::any()), - Argument::Bool("isRoot", false), + Argument::Bool("root", false), Argument::Bool("transparent", false), Argument::String("isa", "")}); @@ -360,7 +360,7 @@ const State OntologyField = StateBuilder() .createdNodeType(&RttiTypes::FieldDescriptor) .elementHandler(OntologyFieldHandler::create) .arguments({Argument::String("name", ""), - Argument::Bool("isSubtree", false), + Argument::Bool("subtree", false), Argument::Bool("optional", false)}); const State OntologyFieldRef = @@ -376,7 +376,7 @@ const State OntologyStructPrimitive = .createdNodeType(&RttiTypes::FieldDescriptor) .elementHandler(OntologyPrimitiveHandler::create) .arguments( - {Argument::String("name", ""), Argument::Bool("isSubtree", false), + {Argument::String("name", ""), Argument::Bool("subtree", false), Argument::Bool("optional", false), Argument::String("type")}); const State OntologyStructChild = StateBuilder() @@ -397,7 +397,7 @@ const State OntologyStructParentField = .createdNodeType(&RttiTypes::FieldDescriptor) .elementHandler(OntologyParentFieldHandler::create) .arguments({Argument::String("name", ""), - Argument::Bool("isSubtree", false), + Argument::Bool("subtree", false), Argument::Bool("optional", false)}); const State OntologyStructParentFieldRef = 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 |