Re: Inherited Constants?
| From: | Christoph M. Becker | Date: | Thu, 20 Sep 2018 18:01:49 +0000 |
| Subject: | Re: Inherited Constants? | ||
| References: | 1 2 3 4 5 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969387033@lists.php.net to get a copy of this message | ||
On 19.09.2018 at 22:19, Peter Cowburn wrote:
> On 19 September 2018 at 10:28, Christoph M. Becker <cmbecker69@gmx.de>
> wrote:
>
>> However, the xpointer expression
>>
>> xpointer(id('class.*')/db:partintro/db:section/db:classsynopsis/db:
>> fieldsynopsis)
>>
>> would also include properties of the parent class. Can it be improved
>> to distinguish between constants and properties?
>
> Adding in a predicate looking for the classsynopsisinfo that comes just
> before these fieldsynopsis elements should suffice, I think. Something
> along the lines of:
>
>
> xpointer(id('class.myawesomeclass')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment'
> and text()='&Constants;']])
Thanks, that seems to work! I've committed
<http://svn.php.net/viewvc?view=revision&revision=345662>.
BTW: somebody might want to have a look at the inherited properties.
Sometimes their shown, but often not; sometimes the properties are
copied and pasted. And the XPATH expression are too general, at least
sometimes.
>> Should the classname skeleton[3] also be updated with the solution we'll
>> choose?
>
> Yup, and the docgen script as well (
>
> http://svn.php.net/viewvc/phpdoc/doc-base/trunk/scripts/docgen/),
> since
> they're the two recommended ways of adding new doc files in the tutorial (
> http://doc.php.net/tutorial/editing.php).
Geez! I'll give it a try as soon as possible.
--
Christoph M. Becker