Autor | Zpráva | ||
---|---|---|---|
rebajz Profil * |
#1 · Zasláno: 9. 11. 2008, 12:41:25
Zdravim,
potreboval bych poradit. V promene LongDeskription mam napsan text, za textem #### (4x#) pak jiny text (ruzne dlouhy) s oddelitkem ##### (5x#) a dalsi textik (ruzne dlouhy). muj problem je v tom, ze v jedne casti stranek potrebuji pouzit jen tu cast textu ktera je za temi (4x#) ale uz tam nesmi byt ten text ktery je za temi (5x#). - jinak to nelze resit, v DB neni mozne rozsirit sloupce (nemam pristup a ani ho nemuzu ziskat), takze musim vyuzit jen ty co uz tam jsou - proto ta nouzovka :-( prvni cast ukolu zvladam, ale tu druhou uz ne. mohl by nekdo z Vas doplnit zbyvajici cast kodu? (moje představa ze udelam tohle <xsl:value-of select="substring-before(LongDescription, '#####')-substring-after(LongDescription, '####')" disable-output-escaping="yes"/> byla jaksi spatna... napise to logicky NaN kod k uprave: <xsl:when test="contains(LongDescription, '####')"> <div class="longdesc"><xsl:value-of select="substring-after(LongDescription, '####')" disable-output-escaping="yes"/></div> </xsl:when> predem diky za pomoc |
||
rebajz Profil * |
#2 · Zasláno: 9. 11. 2008, 19:58:45
nevite nahodou?
|
||
tiso Profil |
#3 · Zasláno: 9. 11. 2008, 21:57:33 · Upravil/a: tiso
<xsl:when test="contains(LongDescription, '####')"> <xsl:variable name="LongDescriptionBefore" select="substring-before(LongDescription, '#####')"/> <xsl:value-of select="substring-after(@LongDescriptionBefore, '####')" disable-output-escaping="yes"/> </xsl:when> |
||
quinux Profil |
#4 · Zasláno: 10. 11. 2008, 08:21:38
rebajz
„<xsl:value-of select="substring-before(LongDescription, '#####')-substring-after(LongDescription, '####')" disable-output-escaping="yes"/> byla jaksi spatna... napise to logicky NaN “ No, nemůžeš to psát takhle za sebe, ale "vnořovat" do sebe :) <xsl:value-of select="substring-after(substring-before(@LongDescription, '#####'),'####')"/> |
||
rebajz Profil * |
#5 · Zasláno: 10. 11. 2008, 09:29:02
quinux: diky moc - funguje to!!! (jen jsem musel odstranit ten zavinac) :-)
|
||
Časová prodleva: 15 let
|
0