doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Mark up unspecific constants as replaceable

Open cmb69 opened this issue 3 years ago • 5 comments

Great idea of @Girgias, in my opinion.

cmb69 avatar Nov 07 '22 15:11 cmb69

Does our DTD really not allow <constant>LC_<replaceable>*</replaceable></constant>?

Otherwise, LGTM, but I would wait a bit before merging to not put too much strain on translation before the release of 8.2.

Girgias avatar Nov 09 '22 14:11 Girgias

Does our DTD really not allow <constant>LC_<replaceable>*</replaceable></constant>?

Otherwise, LGTM, but I would wait a bit before merging to not put too much strain on translation before the release of 8.2.

Now that I think about it, having the replaceable tag be just after the constant one will probably help if (one can dream) we get links to constants automatically generated as those will need to be ignored

Girgias avatar Nov 10 '22 12:11 Girgias

Does our DTD really not allow <constant>LC_<replaceable>*</replaceable></constant>?

Yeah, I got a failure when running configure, although the constant spec says:

Mixed Content Model constant ::= (#PCDATA|replaceable|inlinegraphic|inlinemediaobject|indexterm| beginpage)*

Now that I think about it, having the replaceable tag be just after the constant one will probably help if (one can dream) we get links to constants automatically generated as those will need to be ignored

Indeed, avoinding mixed content in <constant>s should make that easier.

cmb69 avatar Nov 10 '22 13:11 cmb69

My preference would be to only mark up the replaceable part as replaceable.

I don't buy the argument that <constant><replaceable>FOO_*</replaceable></constant> should be (any meaningful amount) easier to work with than <constant>FOO_<replaceable>*</replaceable></constant> (e.g. for adding links, generating lists of constants, etc.).

Regardless, either way is an improvement on what we have now.

Yeah, I got a failure when running configure

What was the failure? A quick search/replace to the <constant>FOO_<replaceable>*</replaceable></constant> format didn't result in a failure for me locally.

salathe avatar Nov 10 '22 14:11 salathe

What was the failure? A quick search/replace to the <constant>FOO_<replaceable>*</replaceable></constant> format didn't result in a failure for me locally.

I've tried again, and indeed it works. I must have messed something up in my first attempt.

I don't buy the argument that <constant><replaceable>FOO_*</replaceable></constant> should be (any meaningful amount) easier to work with than <constant>FOO_<replaceable>*</replaceable></constant> (e.g. for adding links, generating lists of constants, etc.).

Well, there isn't probably much of a difference, so I'm pushing a commit where only the *s are <replaceable>.

cmb69 avatar Nov 16 '22 15:11 cmb69