Minimize DTD sybsystem - #5742
Conversation
| @@ -1,115 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
There was a problem hiding this comment.
In theory, this file still exists in translations, more so on the more than one with decade old outdated files. In this case, should they be removed as they are removed from doc-en, should they be removed only when all translations are updated (a.k.a., never) ?
There was a problem hiding this comment.
Translations don't actively use docbook-cs.xml from what I am aware of. True that they may use entities files that doc-en has ditched, but it's perfectly fine if they manage their own paths for what's still relevant to them.
So IMHO better to remove it.
|
|
||
| <entity name="AuthenticationServices">Authentication Services</entity> | ||
|
|
||
| <entity name="CalendarandEventRelatedExtensions">Date and Time Related |
There was a problem hiding this comment.
some have gain a \n, is it intended ?
There was a problem hiding this comment.
It is intended, and it is ugly. There are a few lines that pass the 80 column marker. I'm considering removing the breaks, as this file is still (and forever will be?) small.
There was a problem hiding this comment.
I have purposely broken that rule in Acronyms.ent as well for the same reason. So I have absolutely no problem if this rule will be broken here.
|
The failures are expected, for now. The other PR on doc-base, that will be merged first, rename some doc-base/temp/ files and extensions. The only remaining DTD entity files left are doc-base/entities/global.ent and doc-lang/language-snippets.ent. The first one is to be simply erased after more changes are sent indo doc-base/configure.php, and the last one may linger for a while. After XML trim lands, all these |
| ]> | ||
|
|
||
| <set xmlns="http://docbook.org/ns/docbook" version="5.2" xml:id="index" xml:lang="&LANG;" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
| <set xml:id="index" xml:lang="" version="5.2" |
There was a problem hiding this comment.
Wouldn't it be better to hardcode "en" instead of leaving xml:lang empty?
There was a problem hiding this comment.
The ideia is to it always be filled, by API instead of by entity: https://github.com/php/doc-base/pull/336/files#diff-72f941dd66490c5d4d1315814f9ba8c7cd1329fce421907e5716156718527235R733
The code is in crude form, because I was to merge Trim PR first, then the other PR. But I delayed, I will change this line to consider $ret. &LANG; is still being generated so nothing breaks at first.
Hard coding with "en" may cause a future failure to be silently ignored.
There was a problem hiding this comment.
Also, note that --with-base-lang=extensions is creating Docbook files with root element marked as xml:lang=extensions", because the long standing convention of configure.php, where LANG means "language directory named with a valid BCP 47 language tag".
So, for example, doc-extensions/manual.xml can hard code xml:lang as "en", but the main manual leaves it empty, and the code only fills this attribute from LANG if it is currently empty.
The
doc-enside of DTD subsystem minimization.Convert
language-defs.entinto XML, and rewritemanual.xmlto use the minimized DTD configuration. Also inmanual.xml:<set>namespaces is reorganized,&global.function-index;is not necessary anymore.This PR depends on the PR with the same name on the doc-base side.
Comments and reviews are welcome. Plan to merge this in one week.