Skip to content

Minimize DTD subsystem - #336

Open
alfsb wants to merge 2 commits into
php:masterfrom
alfsb:minimize-dtd
Open

Minimize DTD subsystem#336
alfsb wants to merge 2 commits into
php:masterfrom
alfsb:minimize-dtd

Conversation

@alfsb

@alfsb alfsb commented Aug 6, 2026

Copy link
Copy Markdown
Member

With this change, the preamble of all manual.xml can be reduced to just:

<?xml version="1.0" encoding="utf-8"?>
<?do-not-translate?>

<!DOCTYPE PHPDOC [
<!ENTITY % configure SYSTEM "./temp/conf.dtd">
%configure;
]>

And cross-repository PRs about the DTD subsystem will disappear. Also allows the removal of the &LANG; entity, the only case of entity in XML attribute on manual. Can be merged as is, but a similar change on doc-en will be done. Expected conflict with the-big-trim branch, that will be merge first.

Comments and reviews are welcome. Plan to merge this in one week.

Comment thread configure.php
Comment on lines +637 to +639
$contents .= dtd_pe_load( "language-defs" , __DIR__ . "/../$base/language-defs.ent" );
$contents .= dtd_pe_load( "language-snippets" , __DIR__ . "/../$base/language-snippets.ent" );
$contents .= dtd_pe_load( "language-extensions" , __DIR__ . "/../$base/extensions.ent" );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$contents .= dtd_pe_load( "language-defs" , __DIR__ . "/../$base/language-defs.ent" );
$contents .= dtd_pe_load( "language-snippets" , __DIR__ . "/../$base/language-snippets.ent" );
$contents .= dtd_pe_load( "language-extensions" , __DIR__ . "/../$base/extensions.ent" );

Comment thread configure.php
$contents .= dtd_pe_load( "translation-defs" , __DIR__ . "/../$lang/language-defs.ent" );
$contents .= dtd_pe_load( "translation-snippets" , __DIR__ . "/../$lang/language-snippets.ent" );
$contents .= dtd_pe_load( "translation-extensions" , __DIR__ . "/../$lang/extensions.ent" );
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
}
}
$contents .= dtd_pe_load( "language-defs" , __DIR__ . "/../$base/language-defs.ent" );
$contents .= dtd_pe_load( "language-snippets" , __DIR__ . "/../$base/language-snippets.ent" );
$contents .= dtd_pe_load( "language-extensions" , __DIR__ . "/../$base/extensions.ent" );

@lacatoire lacatoire Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

language and english would have been reverted.
Before it was done in doc-en

Comment thread configure.php
$conf[] = "<!ENTITY % translation-snippets $langTwo2>";
$conf[] = "<!ENTITY % translation-extensions $langTwo3>";
if ( $GLOBALS['ac']['CHMENABLED'] == 'yes' )
$contents = dtd_pe_body( "manual.chmonly" , __DIR__ . "/chm/manual.chm.xml" );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$contents = dtd_pe_body( "manual.chmonly" , __DIR__ . "/chm/manual.chm.xml" );
$contents = dtd_pe_load( "manual.chmonly" , __DIR__ . "/chm/manual.chm.xml" );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants