Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RelaxNG for validation instead of DTD for DocBook 5.2 #170

Merged
merged 10 commits into from
Oct 31, 2024

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Oct 23, 2024

Requires php/doc-en#3911

Copy link
Member

@jimwins jimwins left a comment

Choose a reason for hiding this comment

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

MSTM, and I can confirm that it reports errors when I try to build the doc-en tree as of right now using the Makefile/docker setup.

@cmb69
Copy link
Member

cmb69 commented Oct 24, 2024

I think we need some proper error reporting for CI at least. Can we run Jing there if the build step failed?

@cmb69
Copy link
Member

cmb69 commented Oct 24, 2024

I can confirm that it reports errors when I try to build the doc-en tree as of right now using the Makefile/dock

Ah, already tracked as php/doc-en#3912.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

I think we also should add a license file for jing. The downloads have doc/copying.html, were we like should strip the <h2>Third-party JARs</h2> part.

*/
$output = shell_exec('java -jar ./docbook/jing.jar ./docbook/docbook-v5.2-os/rng/docbookxi.rng .manual.xml');
if ($output === null) {
echo "Command failed do you have Java installed?";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Command failed do you have Java installed?";
echo "Command failed; do you have Java installed?";

or something (may full-stop)

@Girgias
Copy link
Member Author

Girgias commented Oct 24, 2024

I am going to need to fix the translations first, as they are violating RelaxNG.

Also we need to add Java to the CI

@cmb69
Copy link
Member

cmb69 commented Oct 24, 2024

Isn't Java preinstalled on Ubuntu runners? (https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md)

@Girgias
Copy link
Member Author

Girgias commented Oct 24, 2024

Isn't Java preinstalled on Ubuntu runners? (https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md)

Yeah, no the issue is the usage of relative paths

@Girgias
Copy link
Member Author

Girgias commented Oct 24, 2024

Well, need to wait for translation to sync with EN with regard to the entity removal of 33ef031 failure.

@cmb69
Copy link
Member

cmb69 commented Oct 24, 2024

Bigger problem is likely the MongoDB set to book conversion, although there should be PRs.

@Girgias
Copy link
Member Author

Girgias commented Oct 24, 2024

doc-it doesn't have the MongoDB problem, but is quite out of date and doesn't build any more even with some syncing.

Might need to go back to deleting some files for it to build....

@cmb69
Copy link
Member

cmb69 commented Oct 24, 2024

Looking at the recent commit history of doc-it, it might make sense to disable it for the time being.

@Girgias
Copy link
Member Author

Girgias commented Oct 24, 2024

Doc-fr is now RelaxNG compliant,

Submitted some PRs to doc-ja and doc-ru but waiting for them to catch up on the DOM doc-en RelaxNG violation fixes too.

@Girgias
Copy link
Member Author

Girgias commented Oct 27, 2024

doc-ru will be RelaxNG compatible the moment reference/dom is synced with EN (@saundefined)

doc-ja will be RelaxNG compatible the moment reference/dom is synced with EN and php/doc-ja#135 is merged (@mumumu)

I can probably fix doc-it by using DeepL and asking some people that I know to review it.

doc-tr seems to be some misapplied changes and requires markup fixes, which I can probably do.

doc-uk needs install/unix/ngnix.xml to be synced to fix RelaxNG violations, but it needs language/oop5/visibility.xml to be synced just to fix the current DTD build.

doc-es is really just a lost cause at this point, it feels.

@saundefined
Copy link
Member

doc-ru will be RelaxNG compatible the moment reference/dom is synced with EN (@saundefined)

Thanks, fixed

@Girgias Girgias merged commit 747c53b into php:master Oct 31, 2024
9 of 12 checks passed
@Girgias Girgias deleted the docbook-5 branch October 31, 2024 16:25
@Girgias
Copy link
Member Author

Girgias commented Oct 31, 2024

I'll help doc-ja to get back to building.

@alfsb
Copy link
Member

alfsb commented Oct 31, 2024

doc-pt_BR is RelaxNG validating ok? I tested it now, and appears to be good, but to make sure.

Aside: the scripts on doc-base/tree/master/scripts/translation (that doc-pt_BR uses) are somewhat focused in maintaining an translation in structural sync with doc-en, so it may help.

@cmb69
Copy link
Member

cmb69 commented Oct 31, 2024

doc-pt_BR is RelaxNG validating ok?

Yes, looks good: https://github.com/php/doc-base/actions/runs/11615325856/job/32345629762

@Girgias
Copy link
Member Author

Girgias commented Nov 1, 2024

Yes the only ones which don't are doc-es and doc-uk (doc-ja has a PR to make it green)

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.

5 participants