Skip to content
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
409e3a8
Add 'generic' parameter to writeTreeXSD()
vivoeiva May 13, 2026
3a3c9e1
Add generate_xsd tool
vivoeiva May 13, 2026
ee6699d
Fix non-deterministic port attribute order in writeTreeXSD()
vivoeiva May 13, 2026
0ae3219
Add writeTreeSchematron() for cross-reference validation of BT XML files
vivoeiva May 26, 2026
3506f11
Add generate_schematron tool
vivoeiva May 26, 2026
ccaf48e
Add generated XSD and Schematron schemas
vivoeiva May 26, 2026
f4412ef
Add validate_xml.py - XSD and Schematron validation tool
vivoeiva May 26, 2026
5fabd28
Only built-ins should go into generic xsd file
vivoeiva May 27, 2026
e1d967c
Add tests for writeTreeXSD() and writeTreeSchematron()
vivoeiva May 27, 2026
4f60ec4
Fix implicit conversion
vivoeiva May 27, 2026
89b3a25
Also handle inout_port in XSD
vivoeiva May 27, 2026
621d133
Merge branch 'master' into feature/xml-validation
facontidavide Jul 6, 2026
e575e39
Merge branch 'master' into feature/xml-validation
facontidavide Jul 15, 2026
b2289d6
Fix reconfiguration after editing src/btcpp4_schematron.sch
vivoeiva Jul 20, 2026
dc21d9d
Fix writeTreeXSD() signature not to break ABI
vivoeiva Jul 20, 2026
84f4a73
Change placeholder replacement logic for Schematron
vivoeiva Jul 20, 2026
ad1c70c
Add more test cases for InsideXmlComment()
vivoeiva Jul 20, 2026
809c691
Add xsd and schematron checks to CI (intentionally broken)
vivoeiva Jul 20, 2026
d4b31a1
Fix clang-format issues
vivoeiva Jul 20, 2026
5a0e510
Regenerate schemas to pass CI
vivoeiva Jul 20, 2026
36abdc3
Add guard for --no-xsd --no-sch together
vivoeiva Jul 20, 2026
d5af5db
Remove rule checking explicit notation against TreeNodeModel
vivoeiva Jul 24, 2026
cf93f98
Regenerate Schematron file
vivoeiva Jul 24, 2026
9780868
Add Schematron Rule B: explicit-notation node structure constraints
vivoeiva Jul 24, 2026
c185730
Regenerate Schematron file
vivoeiva Jul 24, 2026
11cb813
Merge branch 'master' into feature/xml-validation
vivoeiva Jul 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix non-deterministic port attribute order in writeTreeXSD()
PortsList is an unordered_map so iterating it directly produced XSD
attributes in hash-table order, which varies across runs and platforms.
Sort ports into a std::map before emitting xs:attribute elements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • Loading branch information
vivoeiva and claude committed May 26, 2026
commit ee6699d0df6d6ae2248b6bf85d126b939a02b757
4 changes: 4 additions & 0 deletions src/xml_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,8 +1722,12 @@ std::string writeTreeXSD(const BehaviorTreeFactory& factory, bool generic)
XMLElement* common_attr_group = doc.NewElement("xs:attributeGroup");
common_attr_group->SetAttribute("ref", "commonAttributeGroup");
type->InsertEndChild(common_attr_group);
std::map<std::string, const BT::PortInfo*> ordered_ports;
for(const auto& [port_name, port_info] : model->ports)
ordered_ports.insert({ port_name, &port_info });
for(const auto& [port_name, port_info_ptr] : ordered_ports)
{
const auto& port_info = *port_info_ptr;
XMLElement* attr = doc.NewElement("xs:attribute");
attr->SetAttribute("name", port_name.c_str());
const auto xsd_attribute_type = xsdAttributeType(port_info);
Expand Down