AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Apr 17, 2007, 23:38   #1
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: Feb 2005
Location: Multiverse
Posts: 946
Rep Power: 4
Reputation: 10
Send a message via ICQ to Gor Vardanyan Send a message via MSN to Gor Vardanyan Send a message via Yahoo to Gor Vardanyan Send a message via Skype™ to Gor Vardanyan
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?
__________________


"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Gor Vardanyan is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 06:45   #2
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
Гор, немного неясно, до фига незакрытых тэгов и все такое. Можешь скинуть мне файл целиком, я покопаюсь ?
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 06:48   #3
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
Ах да, кстати, надеюсь, тестишь в броузерах ИЕ версии <= 6 ?
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 11:27   #4
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: Feb 2005
Location: Multiverse
Posts: 946
Rep Power: 4
Reputation: 10
Send a message via ICQ to Gor Vardanyan Send a message via MSN to Gor Vardanyan Send a message via Yahoo to Gor Vardanyan Send a message via Skype™ to Gor Vardanyan
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
__________________


"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Gor Vardanyan is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 11:58   #5
...overwined...
 
noone's Avatar
 
Join Date: Mar 2003
Location: ...tortuga...
Posts: 3,387
Rep Power: 6
Reputation: 140
skorej vsego "if lte IE 6" = false...
__________________
...let's be gods... let's by ugly...
noone is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 12:03   #6
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
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>
Не уверена, что это сработает, но похоже на правду.
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 12:06   #7
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
Quote:
Originally Posted by noone View Post
skorej vsego "if lte IE 6" = false...
Он же тестит в 6-ом? A lte вроде значит less than or equal.
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 19:07   #8
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: Feb 2005
Location: Multiverse
Posts: 946
Rep Power: 4
Reputation: 10
Send a message via ICQ to Gor Vardanyan Send a message via MSN to Gor Vardanyan Send a message via Yahoo to Gor Vardanyan Send a message via Skype™ to Gor Vardanyan
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]-->
__________________


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

Last edited by Gor Vardanyan : Apr 18, 2007 at 19:28.
Gor Vardanyan is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 19:32   #9
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
Гор, ну как, сработало или еще не тестил ?
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 19:45   #10
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: Feb 2005
Location: Multiverse
Posts: 946
Rep Power: 4
Reputation: 10
Send a message via ICQ to Gor Vardanyan Send a message via MSN to Gor Vardanyan Send a message via Yahoo to Gor Vardanyan Send a message via Skype™ to Gor Vardanyan
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>
__________________


"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Gor Vardanyan is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 20:07   #11
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
Gor Vardanyan, а если будет не Эксплорер <= 6 , а что-то другое ? Тогда просто выведется @title ?
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 20:10   #12
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: Feb 2005
Location: Multiverse
Posts: 946
Rep Power: 4
Reputation: 10
Send a message via ICQ to Gor Vardanyan Send a message via MSN to Gor Vardanyan Send a message via Yahoo to Gor Vardanyan Send a message via Skype™ to Gor Vardanyan
eto uje "hide" delayu s pomoshu CSS kokda ne IE browser
__________________


"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Gor Vardanyan is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 20:13   #13
forever blowing winds
 
Азазелка's Avatar
 
Join Date: Oct 2002
Location: Internet
Posts: 2,039
Rep Power: 6
Reputation: 197
Send a message via ICQ to Азазелка
Quote:
Originally Posted by Gor Vardanyan View Post
eto uje "hide" delayu s pomoshu CSS kokda ne IE browser
Фактически, ты в трех местах проверяешь, ИЕ6 у тебя или нет ? Наверное, можно что-нибудь пооптимальнее придумать. Хотя у меня идей нет
__________________
Каждому воздается по вере его.
Азазелка is offline   Reply With Quote Quote selected
Old Apr 18, 2007, 20:18   #14
горно-предгорной жизни =)
 
Gor Vardanyan's Avatar
 
Join Date: Feb 2005
Location: Multiverse
Posts: 946
Rep Power: 4
Reputation: 10
Send a message via ICQ to Gor Vardanyan Send a message via MSN to Gor Vardanyan Send a message via Yahoo to Gor Vardanyan Send a message via Skype™ to Gor Vardanyan
Quote:
Originally Posted by Азазелка View Post
Фактически, ты в трех местах проверяешь, ИЕ6 у тебя или нет ? Наверное, можно что-нибудь пооптимальнее придумать. Хотя у меня идей нет
da ne vinovat ya, XSL sam prishol
__________________


"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Albert Einstein
Gor Vardanyan is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
3DS Max 7 Quick Question Silver Software 1 Jul 15, 2006 10:24
question Guess Web sites 2 Mar 26, 2006 23:24
A question of mind... Red Stone English Only 4 Oct 19, 2005 17:40


All times are GMT. The time now is 21:58.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link