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)
1359
1359
{
1360
1360
XMLElement* type = doc.NewElement (" xs:complexType" );
1361
1361
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))
1363
1365
{
1364
1366
/* No children, nothing to add. */
1365
1367
}
1366
- else if ((model->type == NodeType::DECORATOR)
1367
- or (model->type == NodeType::SUBTREE))
1368
+ else if (model->type == NodeType::DECORATOR)
1368
1369
{
1369
1370
/* One child. */
1370
- // <xs:group ref="oneNodeGroup" minOccurs="0 " maxOccurs="1"/>
1371
+ // <xs:group ref="oneNodeGroup" minOccurs="1 " maxOccurs="1"/>
1371
1372
XMLElement* group = doc.NewElement (" xs:group" );
1372
1373
group->SetAttribute (" ref" , " oneNodeGroup" );
1373
- group->SetAttribute (" minOccurs" , " 0 " );
1374
+ group->SetAttribute (" minOccurs" , " 1 " );
1374
1375
group->SetAttribute (" maxOccurs" , " 1" );
1375
1376
type->InsertEndChild (group);
1376
1377
}
You can’t perform that action at this time.
0 commit comments