Mailing List Archive

gorg on gentoo.org / debug variable in guidexml
hello!


the german gentoo website gentoo.de is using large collections of
guidexml from gentoo.org, including file xsl/handbook.xsl.

when feeding the handbook to gorg i get

"Variable 'debug' has not been declared."

unless i add a line

<xsl:param name="debug">0</xsl:param>

to xsl/handbook.xsl (see patch [1]).


i was wondering how the setup on gentoo.org is weaving a value of debug
in. can anybody enlighten me?

thanks,



sebastian


[1]
http://git.gentoo-ev.org/gitweb/www-gentoo-de/gitweb.css?p=www-gentoo-de.git;a=commitdiff;h=b9169cb1d53398e6db4fee224bda058514bde85f
Re: gorg on gentoo.org / debug variable in guidexml [ In reply to ]
On 05/25/10 20:50, Robin H. Johnson wrote:
> On Tue, May 25, 2010 at 07:28:11PM +0200, Sebastian Pipping wrote:
>> i was wondering how the setup on gentoo.org is weaving a value of debug
>> in. can anybody enlighten me?
> In guide.xsl.
>
> Your copy is out of date.
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/xml/htdocs/xsl/guide.xsl?r1=1.245&r2=1.246

Right. Robin, thank you!

Best,



Sebastian
Re: gorg on gentoo.org / debug variable in guidexml [ In reply to ]
On Tue, 25 May 2010 19:28:11 +0200
Sebastian Pipping <sping@gentoo.org> wrote:
> i was wondering how the setup on gentoo.org is weaving a value of debug
> in. can anybody enlighten me?

It doesn't. That German site is screwed up in a couple of ways:

1. Its XSL is never up to date. This is the primary cause of issues.
2. It has extra XML files it should not have, such as debug.xml.

Read through gentoo.org's guide.xsl, around line 59: debug is not set unless debug.xml exists in the root folder, which should never happen on gentoo.org.

<!-- Debug mode, when /debug.xml exists, should never be available on www.g.o -->
<xsl:variable name="debug">
<xsl:if test="document('/debug.xml')/debug/@on='1'">1</xsl:if>
</xsl:variable>