[Laszlo-dev] How do I make an xref?

Jim Grandy jgrandy at openlaszlo.org
Fri Jul 6 11:25:49 PDT 2007


On Jul 6, 2007, at 5:45 AM, P T Withington wrote:

> I moved formatToString from the Debug singleton to the LzFormatter  
> mixin and I want to update this xref:
>
>  * Formats its arguments using <xref linkend="Debug 
> +debug.formatToString"/>
>
> I don't understand `Debug+debug`.

The first bit, "Debug", is the name of the class. The second bit,  
"+debug" says that this class is only available in the debug build.

> What should I put there to reference LzFormatter instead?
>
My guess would be "LzFormatter.formatToString" if it is a static  
method, or "LzFormatter.prototype.formatToString" if is it an  
instance method.

Honestly, what I usually do is run the reference build (you can just  
do 'cd docs/src ; ant reference') and go to the page for the class in  
question (here, LzFormatter) and mouse over the method in question to  
see what the link looks like. The last part of the link is the same  
as the entry's Docbook ID, which is what you put in an xref.

(There's also the question of whether we are currently documenting  
mixins correctly; let me know if the page for LzFormatter either  
doesn't get generated or looks wrong and I'll fix that.)

jim


More information about the Laszlo-dev mailing list