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

Fix ext/dom constant aliases #4296

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kocsismate
Copy link
Member

I noticed failures when I tried to run ./build/gen_stub.php --verify-manual ./ ../doc-en/, and it turned out that the newly added ext/dom constant aliases cause this. I found no way to add support for the DOM_INDEX_SIZE_ERR / Dom\INDEX_SIZE_ERR format in gen_stub.php (gen_stub.php can only replace/fix constants one-by-one), so I had to duplicate the constant definitions in the manual.

Since the constant IDs would clash in most of the cases, I had to add an extra dom- prefix to them. It may be possible to fix these via phd and use . as separator instead of - in case of namespaces (?).

@Girgias
Copy link
Member

Girgias commented Dec 12, 2024

Known when reviewing the PR: #4212 (comment)

I don't think duplicating the test is useful, or at minimum use XIncludes so they do not get out of sync.

For the linking aspect I would prefer to have @haszi's input, considering they handled the whole constant linking thing.

@Girgias
Copy link
Member

Girgias commented Dec 12, 2024

I just thought of the good solution, which is to convert the table to a <variablelist> and have multiple <term> elements. Will do that soonish.

@haszi
Copy link
Contributor

haszi commented Dec 29, 2024

For the linking aspect I would prefer to have @haszi's input, considering they handled the whole constant linking thing.

All the linking needs is an xml:id so the simplest way to do this is to use one <term> / <entry> tag per constant and add an xml:id to the alias's tag. This will work as long as we make sure PhD renders those IDs.

E.g.:

     <row xml:id="constant.dom-index-size-err">
      <entry>
       <constant>DOM_INDEX_SIZE_ERR</constant>
       (<type>int</type>)
      </entry>
      <entry xml:id="dom.constants.index-size-err">
       <constant>Dom\INDEX_SIZE_ERR</constant>
       (<type>int</type>)
      </entry>

@kocsismate
Copy link
Member Author

@haszi Thank you for the hint! @Girgias Are you still planning to convert the table to a list?

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

Successfully merging this pull request may close these issues.

3 participants