Enable and fix schema test - #1705
Open
scpeters wants to merge 6 commits into
Open
Conversation
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
A catalog.xml file is configured to rewrite http://sdformat.org/schemas/ URIs to the local build output directory CMAKE_CURRENT_BINARY_DIR. The path to the catalog file is set in XML_CATALOG_FILES and xmllint is invoked with `--catalogs`. Assisted-by: Gemini 3.6 Flash Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
scpeters
force-pushed
the
scpeters/schema_xml_catalog
branch
from
September 2, 2026 18:08
d114d9d to
322246e
Compare
scpeters
marked this pull request as ready for review
September 2, 2026 18:13
scpeters
marked this pull request as draft
September 3, 2026 00:16
Member
Author
|
I'm going to clean this up a little more |
scpeters
force-pushed
the
scpeters/schema_xml_catalog
branch
2 times, most recently
from
September 3, 2026 06:37
5c5f099 to
9c053f9
Compare
This refactors parts of the print_element and print_xsd methods to make the implementations more similar and introduces the following behavior changes: * Empty-element <xsd:element ... /> tags are split into pairs of start-tag and end-tag: <xsd:element ... ></xsd:element> * The pose element in pose.xsd was missing a type attribute that is now added: <xsd:element name='pose' type='pose'>...</xsd:element> Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
An XML element that contains child elements, attributes,
or includes is a complexType, and if it also contains a value
then it has simpleContent. An example of this is
<pose degrees='true'>0 0 0 0 0 0</pose>
This updates the XSD generator to properly wrap these elements
in <xsd:simpleContent><xsd:extension base='{type}'>, which
helps fix some of the schema tests.
Assisted-by: Gemini 3.6 Flash
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
scpeters
force-pushed
the
scpeters/schema_xml_catalog
branch
from
September 3, 2026 07:50
9c053f9 to
b511502
Compare
Fixed recursive processing of nested <include> elements and top-level schema inclusions so nested included components (such as <pose> inside <include>) generate valid schema references. Assisted-by: Gemini 3.6 Flash Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
scpeters
force-pushed
the
scpeters/schema_xml_catalog
branch
from
September 3, 2026 07:54
b511502 to
e4e0652
Compare
scpeters
marked this pull request as ready for review
September 3, 2026 08:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🦟 Bug fix
Fixes #1656, builds on top of #1704
Summary
As noted in #1656, the schema integration test is broken with
xmllintversion 2.15.0 and later, when its internal HTTP client was removed (see also RoboStack/ros-jazzy#200) with failures like:Gemini suggested using an XML catalog to map the external document references to locally cached copies, which is done in 628139a. There are also some failures of the schema test that are fixed by modifying the xmlschema.py script in the following commits (which I recommend reviewing as separate commits):
print_elementandprint_xsdmethods to make their implementations more similar and reduce the diff of subsequent commits. It has mild behavior changes detailed in the commit message. The diff without whitespace may be useful<pose degrees='true'>0 0 0 0 0 0</pose>. The diff without whitespace may be usefulBackport Policy
there will be conflicts backporting to harmonic, as it doesn't have 1.12
Checklist
codecheckpassed (See contributing)Assisted-by: Gemini 3.6 Flash
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.Backports: If this is a backport, please use Rebase and Merge instead.