On Fri, May 14, 2010 at 15:31, Richard Quadling
<rquadl...@googlemail.com> wrote:
> On 14 May 2010 13:40, Hannes Magnusson <hannes.magnus...@gmail.com> wrote:
>> On Thu, May 13, 2010 at 15:00, Richard Quadling
>> <rquadl...@googlemail.com> wrote:
>>> So, I would like to use a role on the methodsynopsis to indicate OOP
>>> or PROC use. This will allow me to include only the OOP methodsynopsis
>>> via the xinclude in the event of method overloading.
>>>
>>> Changing
>>>
>>> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
>>> xpointer(id('class.xyz')/db:refentry/db:refsec...@role='description']/descendant::db:methodsynopsis[1])"
>>> />
>>>
>>> to
>>>
>>> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
>>> xpointer(id('class.xyz')/db:refentry/db:refsec...@role='description']/descendant::db:constructorsynopsis)"
>>> />
>>> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
>>> xpointer(id('class.xyz')/db:refentry/db:refsec...@role='description']/descendant::db:destructorsynopsis)"
>>> />
>>> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook)
>>> xpointer(id('class.xyz')/db:refentry/db:refsec...@role='description']/descendant::db:methodsynops...@role='oop'])"
>>> />
>>>
>>
>> I like it.
>>
>> It has always bothered me that functions use <methodsynopsis>. In the
>> beginning it was <funcsynopsis>, but I can't find any discussion on
>> why it was changed. The <funcdef> model does fit well for us.. But
>> like you said, that would be a major change.
>>
>> -Hannes
>>
>
> Thank you Hannes for the feedback.
>
> I've got change for this which I'm just finalising.
>
> It should mean that we don't need to add role="oop" to all the
> methods, only role="procedural" to the procedural
> methodsysonpsis/constructorsynopsis/destructorsynopsis, so less work
> for the translators.

Since that line isn't translated you could update all the translations
and everything in one go..
It would probably even work to svn diff en > role.patch && cd ja &&
patch -p1 < ../role.patch ......


> Essentially
>
> xxxsynopsis[not(@role='procedural')]
>
> says exclude where the role = procedural. This allows through those
> with no role and those that may now be 'oop' due to my last commit.

What is the default value of role then?
I'd prefer to be consistent throughout..
Either all methods use role=oop or all functions use role=procedural..

That also makes it simpler to work with during rendering if we ever want to.


> And for excluding private inherited methods....
>
> methodsynopsis[not(@role='procedural') and not(modifier='private')]

I thought we removed private things already?
They make no sense for the end user, he can't do anything with it and
it doesn't affect him in any way.




>
> <xi:fallback />
>
> would also be enough to allow for a standard way to include the class
> methods without worrying about if they exist (which is what I'm
> currently leaving it as so the output is the same).
>

Sounds reasonable.
Make it as little work as possible to create classreference pages, it
should be possible to copy&paste it all without thinking about the
xincldues :]

-Hanens

Reply via email to