File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1359,18 +1359,19 @@ std::string writeTreeXSD(const BehaviorTreeFactory& factory)
13591359 {
13601360 XMLElement* type = doc.NewElement (" xs:complexType" );
13611361 type->SetAttribute (" name" , (model->registration_ID + " Type" ).c_str ());
1362- if ((model->type == NodeType::CONDITION) or (model->type == NodeType::ACTION))
1362+ if ((model->type == NodeType::ACTION)
1363+ or (model->type == NodeType::CONDITION)
1364+ or (model->type == NodeType::SUBTREE))
13631365 {
13641366 /* No children, nothing to add. */
13651367 }
1366- else if ((model->type == NodeType::DECORATOR)
1367- or (model->type == NodeType::SUBTREE))
1368+ else if (model->type == NodeType::DECORATOR)
13681369 {
13691370 /* One child. */
1370- // <xs:group ref="oneNodeGroup" minOccurs="0 " maxOccurs="1"/>
1371+ // <xs:group ref="oneNodeGroup" minOccurs="1 " maxOccurs="1"/>
13711372 XMLElement* group = doc.NewElement (" xs:group" );
13721373 group->SetAttribute (" ref" , " oneNodeGroup" );
1373- group->SetAttribute (" minOccurs" , " 0 " );
1374+ group->SetAttribute (" minOccurs" , " 1 " );
13741375 group->SetAttribute (" maxOccurs" , " 1" );
13751376 type->InsertEndChild (group);
13761377 }
You can’t perform that action at this time.
0 commit comments