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

Reply
 
Thread Tools

XSL question
Old 17.04.2007, 23:38   #1
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 42
Posts: 962
Rep Power: 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?
__________________


Follow Me On Twitter

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein

Old 18.04.2007, 06:45   #2
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
Default

Гор, немного неясно, до фига незакрытых тэгов и все такое. Можешь скинуть мне файл целиком, я покопаюсь ?
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 06:48   #3
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
Default

Ах да, кстати, надеюсь, тестишь в броузерах ИЕ версии <= 6 ?
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 11:27   #4
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 42
Posts: 962
Rep Power: 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

Old 18.04.2007, 11:58   #5
...overwined...
 
noone's Avatar
 
Join Date: 03 2003
Location: ...tortuga...
Posts: 3,429
Rep Power: 5
Default

skorej vsego "if lte IE 6" = false...
__________________
...let's be gods... let's by ugly...

Old 18.04.2007, 12:03   #6
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
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>
Не уверена, что это сработает, но похоже на правду.
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 12:06   #7
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
Default

Quote:
Originally Posted by noone View Post
skorej vsego "if lte IE 6" = false...
Он же тестит в 6-ом? A lte вроде значит less than or equal.
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 19:07   #8
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 42
Posts: 962
Rep Power: 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]-->
__________________


Follow Me On Twitter

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein

Last edited by Gor Vardanyan; 18.04.2007 at 19:28.

Old 18.04.2007, 19:32   #9
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
Default

Гор, ну как, сработало или еще не тестил ?
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 19:45   #10
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 42
Posts: 962
Rep Power: 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>
__________________


Follow Me On Twitter

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein

Old 18.04.2007, 20:07   #11
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
Default

Gor Vardanyan, а если будет не Эксплорер <= 6 , а что-то другое ? Тогда просто выведется @title ?
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 20:10   #12
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 42
Posts: 962
Rep Power: 0
Default

eto uje "hide" delayu s pomoshu CSS kokda ne IE browser
__________________


Follow Me On Twitter

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein

Old 18.04.2007, 20:13   #13
forever blowing winds
 
Азазелка's Avatar
 
Join Date: 10 2002
Location: Internet
Age: 43
Posts: 2,178
Rep Power: 5
Default

Quote:
Originally Posted by Gor Vardanyan View Post
eto uje "hide" delayu s pomoshu CSS kokda ne IE browser
Фактически, ты в трех местах проверяешь, ИЕ6 у тебя или нет ? Наверное, можно что-нибудь пооптимальнее придумать. Хотя у меня идей нет
__________________
Оптимиста в детстве уронили. На пессимиста.

Old 18.04.2007, 20:18   #14
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: 02 2005
Location: Multiverse
Age: 42
Posts: 962
Rep Power: 0
Default

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


Follow Me On Twitter

"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Reply




Реклама:
реклама
Buy text link .

All times are GMT. The time now is 07:50.
Top

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