Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 18.04.2007, 00:38   #1
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 34
Posts: 962
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default XSL question

I have XSL file where:

Code:
....

<xsl:variable name="PK" select="@primary-index" />
<xsl:variable name="TABLE-NAME" select="@name" />
<xsl:variable name="TITLE" select="@title" />
<xsl:variable name="ROWS" select="@rows-per-page" />

	
<div id="top-nav">
<div class="inner">
<ul>
<li id="hide-ie" class="drop-li"><a class="item3 drop" href="#nogo">

			   <xsl:value-of select="@title" />

</a>
<xsl:comment><![CDATA[[if lte IE 6]>
 <li class="drop-li"><a class="item3 drop" href="#nogo">

	<xsl:value-of select="@title" />

	<TABLE>
	<TBODY>
	<TR>
	<TD>
   <![endif]]]></xsl:comment>

 
<ul>
<li onclick="List.init('{$TABLE-NAME}', {$ROWS},'{$TITLE}')"><a href="#nogo" class="item3a">List</a></li>

...
How can I get the same output twice <xsl:value-of select="@title" /> ?
For now It print/output the result of the first <xsl:value-of select="@title" />, but not second one.

Is there any solution?
Reply With Quote
Old 18.04.2007, 07:45   #2
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Гор, немного неясно, до фига незакрытых тэгов и все такое. Можешь скинуть мне файл целиком, я покопаюсь ?
Reply With Quote
Old 18.04.2007, 07:48   #3
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Ах да, кстати, надеюсь, тестишь в броузерах ИЕ версии <= 6 ?
Reply With Quote
Old 18.04.2007, 12:27   #4
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 34
Posts: 962
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

priv Lil jan,

ne, vse tegi zakrivayutca, ya tolko postnul tot chast gde ispolzuyu etot <xsl:value-of select="@title" />

i testuyu v IE 6, sam eto pisal (dlya IE) ... i rabotaet, tolko vot vo vtoroi raz rezultat <xsl:value-of select="@title" /> ne pishet.

Ya vot dumayu XSL smotrit, chto odin raz uje "pisal" znacheine <xsl:value-of select="@title" />, to vo vtoroi raz prosto ignariruet. Vot i xotelos uznat', est' li kakie to varianti?

naprimer v PHP est include_once i include
include_once - tolko odin raz
include - skolko mojesh i xochesh
__________________


Follow Me On Twitter

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Reply With Quote
Old 18.04.2007, 12:58   #5
...overwined...
 
noone's Avatar
 
Join Date: 03 2003
Location: ...tortuga...
Posts: 3,429
Downloads: 3
Uploads: 0
Reputation: 158 | 3
Default

skorej vsego "if lte IE 6" = false...
Reply With Quote
Old 18.04.2007, 13:03   #6
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Gor Vardanyan

Quote:
Ya vot dumayu XSL smotrit, chto odin raz uje "pisal" znacheine <xsl:value-of select="@title" />, to vo vtoroi raz prosto ignariruet. Vot i xotelos uznat', est' li kakie to varianti?
Нет, это вряд ли.

Может, дело в том, что как-то этот вызов у тебя попадает в xsl:comment. Попробуй закрыть xsl:comment вот так:
Code:
<xsl:comment><![CDATA[[if lte IE 6]></xsl:comment>
 (the rest of the code) 
<xsl:comment><![endif]]]></xsl:comment>
Не уверена, что это сработает, но похоже на правду.
Reply With Quote
Old 18.04.2007, 13:06   #7
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Quote:
Originally Posted by noone View Post
skorej vsego "if lte IE 6" = false...
Он же тестит в 6-ом? A lte вроде значит less than or equal.
Reply With Quote
Old 18.04.2007, 20:07   #8
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 34
Posts: 962
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by Азазелка View Post
Он же тестит в 6-ом? A lte вроде значит less than or equal.
Yes, you are right

FYI

<!--[if lte IE 6]>
According to the conditional comment this is Internet Explorer lower or equal to 6
<![endif]-->

Last edited by Gor Vardanyan; 18.04.2007 at 20:28.
Reply With Quote
Old 18.04.2007, 20:32   #9
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Гор, ну как, сработало или еще не тестил ?
Reply With Quote
Old 18.04.2007, 20:45   #10
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 34
Posts: 962
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by Азазелка View Post
Gor Vardanyan


Нет, это вряд ли.

Может, дело в том, что как-то этот вызов у тебя попадает в xsl:comment. Попробуй закрыть xsl:comment вот так:
Code:
<xsl:comment><![CDATA[[if lte IE 6]></xsl:comment>
 (the rest of the code) 
<xsl:comment><![endif]]]></xsl:comment>
Не уверена, что это сработает, но похоже на правду.
no that's not correct, as we'll have comment like this

Quote:
<!--[if lte IE 6]></xsl:comment>

<li class="drop-li"><a class="item3 drop" href="#nogo"> <xsl:value-of select="@title" />
<TABLE>
<TBODY>
<TR>
<TD>
<xsl:comment><![endif]-->
But here you opened my mind, that's doesn't work because XSL don't print variable's result in comment.

so, the solution I find (of course with your help) is

Quote:
<xsl:comment><![CDATA[[if lte IE 6]>
<li class="drop-li"><a class="item3 drop" href="#nogo">
<![endif]]]></xsl:comment>

<xsl:value-of select="@title" />

<xsl:comment><![CDATA[[if lte IE 6]>
<TABLE>
<TBODY>
<TR>
<TD>
<![endif]]]></xsl:comment>
Reply With Quote
Old 18.04.2007, 21:07   #11
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Gor Vardanyan, а если будет не Эксплорер <= 6 , а что-то другое ? Тогда просто выведется @title ?
Reply With Quote
Old 18.04.2007, 21:10   #12
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 34
Posts: 962
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

eto uje "hide" delayu s pomoshu CSS kokda ne IE browser
Reply With Quote
Old 18.04.2007, 21:13   #13
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 35
Posts: 2,177
Downloads: 0
Uploads: 0
Reputation: 277 | 3
Default

Quote:
Originally Posted by Gor Vardanyan View Post
eto uje "hide" delayu s pomoshu CSS kokda ne IE browser
Фактически, ты в трех местах проверяешь, ИЕ6 у тебя или нет ? Наверное, можно что-нибудь пооптимальнее придумать. Хотя у меня идей нет
Reply With Quote
Old 18.04.2007, 21:18   #14
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 34
Posts: 962
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by Азазелка View Post
Фактически, ты в трех местах проверяешь, ИЕ6 у тебя или нет ? Наверное, можно что-нибудь пооптимальнее придумать. Хотя у меня идей нет
da ne vinovat ya, XSL sam prishol
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 17:32.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.