OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] links within classsynopsis?



On Nov 9, 2005, at 11:21 PM, Michael Smith wrote:

> Stephen Langer <stephen.langer@nist.gov> writes:
>
>> I've found another problem with <methodsynopsis>.   How would I mark
>> up a C++ const function prototype?
>> I want something like this:
>>    virtual int function() const;
>> But I can only obtain this:
>>    virtual const int function();
>> which isn't the same thing.  The xsl stylesheet doesn't differentiate
>> between <modifier>s applied before and after <methodname>.
>>
>> This is what I tried doing:
>>
>>     <classsynopsis>
>>       <ooclass>
>>       <classname>Test</classname>
>>       </ooclass>
>>       <methodsynopsis>
>>       <modifier>virtual</modifier>
>>       <type>int</type>
>>       <methodname>function</methodname>
>>       <modifier>const</modifier>
>>       <void/>
>>       </methodsynopsis>
>>     </classsynopsis>
>
> OK, having a Modifier after the Methodname is valid in both
> DocBook 4 and DocBook 5. So the above is basically OK. But that
> final Void is not valid where you have it.

That void is apparently a copy-and-paste-o... It wasn't meant to be  
there.

> The problem with processing the above is that the stylesheets do
> not render the contents of Methodsynpsis in document order. They
> render it in order of "all modifiers grouped together", followed
> by "everything else that is not a modifier".

...

> That logic seems to not consider the case where a Methodsynopsis
> has a Modifier at the end. Perhaps it is a intentional design
> decision. But it seems like an oversight.

That's what I thought.

> Can you please file a
> bug report for it -
>
>   https://sourceforge.net/tracker/?func=add&group_id=21935&atid=373747
>
> You will need to have a Sourceforge account to file it. If it's
> too much of a hassle, let me know, and I will file it myself.

I'll do it.   I do have a Sourceforge account.

>
> I think we probably need to refine the select matches for those
> variables to:
>
>   <xsl:variable name="start-modifiers"
>     select="modifier[following-sibling::*[name(.) != 'modifier']]"/>
>   <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
>   <xsl:variable name="end-modifiers"
>     select="modifier[preceding-sibling::*[name(.) != 'modifier']]"/>
>
> And then process it in order start-notmods-endmods

I'll try modifying the style sheet accordingly.  You've provided the  
syntax for "select", which was going to take me a long time to figure  
out..

Thanks.
       -- Steve

--
-- EMail: stephen.langer@nist.gov                    Phone: (301)  
975-5423 --
-- WWW:  http://math.nist.gov/mcsd/Staff/SLanger/    Fax:   (301)  
990-4127 --
-- Mail: NIST; 100 Bureau Drive -- Stop 8910; Gaithersburg, Md   
20899-8910 --

-- "I don't think this will work.  That's why it's  
science."               --
--                                      Naomi Langer,  17 Feb  
2003         --




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]