Re: CDATA in source comments



Hi Matthias,

thats what I was thinking, but it does not. Using:
/**
  * ...
  * <informalexample><programlisting>
  * g_object_get(bla,"peng",&peng);
  * </programlisting>
  * </informalexample>
  */

produces an parser error abount an EntityRef that needs to be compleeted by a
';' - means the '&' infront of 'peng' is not escaped to become '&amp;'.
Thats my I was trying to use a CDATA section 9to avoid manually escaping all the
 special chars.

Stefan

Matthias Clasen wrote:
> On Mon, 2004-11-22 at 19:23 +0100, Stefan Kost wrote:
> 
>>hi hi,
>>
>>I've tried to put some sample code into a doc comment
>>
>>/**
>>  * ...
>>  * <informalexample><programlisting><![CDATA[
>>  * g_object_get(bla,"peng",&peng);]]></programlisting>
>>  * </informalexample>
>>  */
>>
>>This generates errors in the XML (xml/filename.xml). Some code in the gtk-doc
>>toolchain converts the '>' after the ']]' that closes the CDATA section into &gt;.
> 
> 
> Yes, unless you call gtkdoc-mkdb with the switch to disable markup in
> comments (whose name escapes me at the moment)
> 
> It shouldn't be necessary to use a marked section there, because, as you
> noticed, gtk-doc handles the & < > escaping for you. What you may want
> to do is prevent gtk-doc from generating links for argumentless function
> calls, by writing them as foo(<!-- -->). That is a bit ugly, but works.
> 
> Matthias
> 
> _______________________________________________
> gtk-doc-list mailing list
> gtk-doc-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-doc-list
> 

-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -
begin:vcard
fn:Stefan Kost
n:Kost;Stefan
org:HTWK Leipzig;FB. IMN
adr:;;Postfach 301166;Leipzig;;04251;Germany
email;internet:kost imn htwk-leipzig de
title:Dipl. Informatiker
tel;work:+49341 30766440
tel;home:+49341 2253538
tel;cell:+49178 3183742
x-mozilla-html:FALSE
url:http://www.imn.htwk-leipzig.de/~kost/about.html
version:2.1
end:vcard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]