Skip to content

Conversation

@bdbaddog
Copy link
Contributor

@bdbaddog bdbaddog commented Nov 17, 2025

Existing Docbook/SCons schema was failing with non-determinant errors.

Used Claude AI to find and fix the issues. Here's it's summary.

Summary of Changes

The fix involved two main components:

  1. Code Changes (bin/SConsDoc.py)
  • Added better error handling for when lxml is not installed
  • Provides a clear error message directing users to install lxml
  1. XSD Schema Fixes (for lxml 6.0+ compatibility)

doc/xsd/dbpoolx.xsd:

  • Fixed 7 .char.mix groups by removing the non-deterministic <xs:sequence><xs:choice minOccurs="0"> wrapper pattern
  • Removed duplicate element references that were already covered by substitution groups:
    • Removed sconstruct, scons_example, scons_example_file, scons_output from para.mix (already in linespecific.class)
    • Removed sets, uses from tool.mix and scons_function.mix (already in list.class)
    • Removed arguments from scons_function.mix (already in synop.class)
    • Removed summary.mix reference from summary element

doc/xsd/dbhierx.xsd:

  • Fixed refinline.char.mix group by removing the wrapper pattern
  • Removed explicit lot reference from article.class (already in nav.class)

All changes maintain backward compatibility while making the schemas compliant with lxml 6.0's stricter validation rules for Python 3.13+.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt and RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

…ythons (>=3.14). Fixes created by using Claude Ai
# it's been a troublesome component in the past.
# Skip lxml for win32 as no tests which require it currently pass on win32
lxml<5; python_version < '3.13' and sys_platform != 'win32'
lxml>=5.0.0; python_version >= '3.13'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the Windows issue resolved, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure. I'll give it a try later.

<xs:element ref="linespecific.class"/>
<xs:element ref="informal.class"/>
<xs:element ref="formal.class"/>
<xs:element ref="sconstruct"/>
Copy link
Collaborator

@mwichmann mwichmann Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it okay to just remove these here? I realize this is mentioned in the "Summary of changes", but I don't recall seeing these in duplicate places when I was digging earlier.

<xs:choice>
<xs:element ref="arguments"/>
<xs:element ref="summary"/>
<xs:element ref="sets"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again... sets and uses are scons things, was it okay to just remove?

@mwichmann
Copy link
Collaborator

I realize nobody currently working on the project uses these, but can the parallel setups in editor_configs get the same changes for completeness?

doc/editor_configs/xmlmind5/addon/config/scons/scons_xsd/dbpoolx.xsd
doc/editor_configs/serna/scons/xsd/dbpoolx.xsd
doc/editor_configs/xmlmind/addon/config/scons/scons_xsd/dbpoolx.xsd

I have no idea which xmlmind is supposed to match "current", as the current version is 10.x - that is, don't know if '5' is a legacy version for a specific older release, or was at its time intended to be the "newest".

@mwichmann
Copy link
Collaborator

I have no idea which xmlmind is supposed to match "current", as the current version is 10.x - that is, don't know if '5' is a legacy version for a specific older release, or was at its time intended to be the "newest".

Correction - the current version is 11.0 (personal edition is free to individuals and open source projects)

@bdbaddog
Copy link
Contributor Author

I realize nobody currently working on the project uses these, but can the parallel setups in editor_configs get the same changes for completeness?

doc/editor_configs/xmlmind5/addon/config/scons/scons_xsd/dbpoolx.xsd
doc/editor_configs/serna/scons/xsd/dbpoolx.xsd
doc/editor_configs/xmlmind/addon/config/scons/scons_xsd/dbpoolx.xsd

I have no idea which xmlmind is supposed to match "current", as the current version is 10.x - that is, don't know if '5' is a legacy version for a specific older release, or was at its time intended to be the "newest".

Assuming those are just copies, no reason not to.. I'll do it today.

@mwichmann mwichmann added the Release Any an all issues with releasing and packaging SCons itself label Nov 19, 2025
@mwichmann
Copy link
Collaborator

mwichmann commented Nov 19, 2025

Nevermind - erroneous comment removed.

@bdbaddog
Copy link
Contributor Author

Nevermind - erroneous comment removed.

Had me worried for a moment. So looks good?

@mwichmann
Copy link
Collaborator

Nevermind - erroneous comment removed.

Had me worried for a moment. So looks good?

Finally tried it, and "it builds". Or more interstingly, "it validates", Python 3.13 and lxml 6.0.2.

For your next trick (separate PR, of course), feel like eliminating some of the doc build warnings via similar queries?

@bdbaddog
Copy link
Contributor Author

Nevermind - erroneous comment removed.

Had me worried for a moment. So looks good?

Finally tried it, and "it builds". Or more interstingly, "it validates", Python 3.13 and lxml 6.0.2.

For your next trick (separate PR, of course), feel like eliminating some of the doc build warnings via similar queries?

Sure. Probably won't hurt to try..

@bdbaddog bdbaddog changed the title [WIP] Updates to fix SCons/Docbook schema to work with lxml>5.0 and newer pythons (>=3.14). Fixes created by using Claude Ai Updates to fix SCons/Docbook schema to work with lxml>5.0 and newer pythons (>=3.14). Fixes created by using Claude Ai Nov 19, 2025
@bdbaddog bdbaddog merged commit 8c15e8c into SCons:master Nov 21, 2025
10 checks passed
@mwichmann mwichmann added this to the NextRelease milestone Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Release Any an all issues with releasing and packaging SCons itself

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants