Skip to content

Commit

Permalink
Fix DTD export
Browse files Browse the repository at this point in the history
Signed-off-by: Gaël Écorchard <[email protected]>
  • Loading branch information
Gaël Écorchard committed Nov 24, 2023
1 parent 4d8664b commit 54f0c7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/xml_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ std::string writeTreeDTD(const BehaviorTreeFactory& factory)
}
else if (port_info.type() == typeid(bool))
{
type = "(true|false)";
type = "(0|1|true|false|TRUE|FALSE|True|False)";
}
else
{
Expand All @@ -1202,7 +1202,7 @@ std::string writeTreeDTD(const BehaviorTreeFactory& factory)
dtd << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";

// dtd << "<!DOCTYPE root [\n";
dtd << "<!ELEMENT root (BehaviorTree|TreeNodesModel|include)*>\n";
dtd << "<!ELEMENT root (BehaviorTree*|TreeNodesModel?|include*)>\n";
dtd << "<!ATTLIST root BTCPP_format CDATA #REQUIRED>\n";
dtd << "<!ATTLIST root main_tree_to_execute CDATA #IMPLIED>\n";
dtd << "\n";
Expand All @@ -1217,6 +1217,7 @@ std::string writeTreeDTD(const BehaviorTreeFactory& factory)
dtd << "<!ELEMENT include EMPTY>\n";
dtd << "<!ATTLIST include path CDATA #REQUIRED>\n";
dtd << "<!ATTLIST include ros_pkg CDATA #IMPLIED>\n";
dtd << "\n";

dtd << "<!ELEMENT Action (input_port*,output_port*,description?)>\n";
dtd << "<!ATTLIST Action ID CDATA #REQUIRED>\n";
Expand All @@ -1236,6 +1237,8 @@ std::string writeTreeDTD(const BehaviorTreeFactory& factory)

dtd << "<!ELEMENT SubTree (#PCDATA)>\n";
dtd << "<!ATTLIST SubTree ID CDATA #REQUIRED>\n";
dtd << "<!ATTLIST SubTree name CDATA #IMPLIED>\n";
dtd << "<!ATTLIST SubTree _autoremap (0|1|true|false|TRUE|FALSE|True|False) \"false\">\n";
dtd << "\n";

dtd << "<!ELEMENT description (#PCDATA)>\n";
Expand Down

0 comments on commit 54f0c7b

Please sign in to comment.