Re: use of variables on XSL
Antonio Gallardo escribió: (BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) ) Yes, this no me friegues sounds like Nicaraguan spanish!!! Your friend Thorsten told me about it, and we allways are saying it!! lol. :-DD Best Regards, Antonio Gallardo. :) You are world famous in spain and No me friegues at least now in Sevilla. :) Greetings from the pollo raro and me. -- thorsten Together we stand, divided we fall Hey you (Pink Floyd) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use of variables on XSL
On Mie, 19 de Enero de 2005, 2:33, Thorsten Scherler dijo: Antonio Gallardo escribió: (BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) ) Yes, this no me friegues sounds like Nicaraguan spanish!!! Your friend Thorsten told me about it, and we allways are saying it!! lol. :-DD Best Regards, Antonio Gallardo. :) You are world famous in spain and No me friegues at least now in Sevilla. :) Sounds like you are teaching spanish there. ;-) That is cool, DUDE! :-DD Greetings from the pollo raro and me. Many Thanks and plase send him my greetings too! :-) Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
use of variables on XSL
Hello List! I need to use a variable as a accountant. I try to use xsl:variable/ but I have seen that I can´t change its value. What kind of tag can I use for a accountant? Thanks!! (Hi Thorsten!! As you can see my English is very poor... Jjejej y no me friegues!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use of variables on XSL
Discussion of XSL properly belongs on that mailing list... but if you post some code (XSL and XML) that explains what you are trying to do, we might be able to help ;-) [EMAIL PROTECTED] 2005/01/18 12:23:44 PM Hello List! I need to use a variable as a accountant. I try to use xsl:variable/ but I have seen that I can´t change its value. What kind of tag can I use for a accountant? Thanks!! (Hi Thorsten!! As you can see my English is very poor... Jjejej y no me friegues!) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use of variables on XSL
On Mar, 18 de Enero de 2005, 4:23, emilio leiva serrano dijo: Hello List! Hello! I need to use a variable as a accountant. I try to use xsl:variable/ but I have seen that I can´t change its value. What kind of tag can I use for a accountant? It is more an XSLT question. I guess by accountant you think a counter. In XSLT once you set a variable, you cannot change it. One of the things you can do is using position()? http://www.zvon.org/xxl/XSLTreference/Output/function_position.html We can help better if you explain what are you trying to to archieve? (Hi Thorsten!! As you can see my English is very poor... Jjejej y no me friegues!) Don't worry about your english. We need to worry because don't speaks other languages here. :-D BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) Best Regards, Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use of variables on XSL
Hi again!! I'm trying to make a table of notes (idnota and nota) with request values First xsl page: notas xsl:for-each select=notas/sql:rowset/sql:row/sql:id_nota idnota xsl:value-of select=./ /idnota /xsl:for-each xsl:for-each select=notas/sql:rowset/sql:row/sql:nota nota xsl:value-of select=./ /nota /xsl:for-each /notas ... Second xsl page: xsl:variable name=cont1/xsl:variable xsl:variable name=valor/ xsl:template match=/ html body xsl:apply-templates / /body /html /xsl:template . xsl:template match=notas form action=editnotas method=get table border=1 xsl:for-each select=idnota xsl:variable name=valorxsl:value-of select=.//xsl:variable tr td select name=opcion{$cont} option value=Opciones/option option value=M-{$valor}Modificar/option option value=S-{$valor}Suprimir/option /select /td td xsl:value-of select=../nota[$cont]/xsl:value-of select=$cont/ /td /tr xsl:variable name=contxsl:value-of select=$cont+1//xsl:variable /xsl:for-each /table /form /xsl:template ... If I can't use xsl:variable for the counter, What can I do??? (BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) ) Yes, this no me friegues sounds like Nicaraguan spanish!!! Your friend Thorsten told me about it, and we allways are saying it!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use of variables on XSL
Difficult to make sense of what you are trying to achieve, especially with the cont variable - what exactly do you want the counter to show? What does the XML structure after the first XSL look like? If: notas idnota data/ /idnota nota data/ /nota /notas In this case, there is *no* structural relationship between idnota and nota, so that a call like: xsl:value-of select=../nota[$cont]/xsl:value-of select=$cont/ inside of the: xsl:for-each select=idnota ... /xsl:for-each loop does not really make sense? If you are trying to figure out which idnota tag you are processing, use the position() function, as already suggested. [EMAIL PROTECTED] 2005/01/18 02:05:09 PM Hi again!! I'm trying to make a table of notes (idnota and nota) with request values First xsl page: notas xsl:for-each select=notas/sql:rowset/sql:row/sql:id_nota idnota xsl:value-of select=./ /idnota /xsl:for-each xsl:for-each select=notas/sql:rowset/sql:row/sql:nota nota xsl:value-of select=./ /nota /xsl:for-each /notas ... Second xsl page: xsl:variable name=cont1/xsl:variable xsl:variable name=valor/ xsl:template match=/ html body xsl:apply-templates / /body /html /xsl:template . xsl:template match=notas form action=editnotas method=get table border=1 xsl:for-each select=idnota xsl:variable name=valorxsl:value-of select=.//xsl:variable tr td select name=opcion{$cont} option value=Opciones/option option value=M-{$valor}Modificar/option option value=S-{$valor}Suprimir/option /select /td td xsl:value-of select=../nota[$cont]/xsl:value-of select=$cont/ /td /tr xsl:variable name=contxsl:value-of select=$cont+1//xsl:variable /xsl:for-each /table /form /xsl:template ... If I can't use xsl:variable for the counter, What can I do??? (BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) ) Yes, this no me friegues sounds like Nicaraguan spanish!!! Your friend Thorsten told me about it, and we allways are saying it!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use of variables on XSL
On Mar, 18 de Enero de 2005, 6:05, emilio leiva serrano dijo: Hi again!! :-D The looks very procedural oriented. This is not the XSLT way. I noted you are using sql transformer. Is this correct? I'm trying to make a table of notes (idnota and nota) with request values First xsl page: notas xsl:for-each select=notas/sql:rowset/sql:row/sql:id_nota idnota xsl:value-of select=./ /idnota /xsl:for-each xsl:for-each select=notas/sql:rowset/sql:row/sql:nota nota xsl:value-of select=./ /nota /xsl:for-each /notas you can rewrite the above code by using a new template. Is not recommended for performance reasons the use xsl:for-each, because it force to read all the node and that considerably slow down the processing. Anyway, lets assume this is OK. ;-) ... Second xsl page: xsl:variable name=cont1/xsl:variable xsl:variable name=valor/ xsl:template match=/ html body xsl:apply-templates / /body /html /xsl:template . xsl:template match=notas form action=editnotas method=get table border=1 xsl:for-each select=idnota xsl:variable name=valorxsl:value-of select=.//xsl:variable tr td select name=opcion{$cont} option value=Opciones/option option value=M-{$valor}Modificar/option option value=S-{$valor}Suprimir/option /select /td td xsl:value-of select=../nota[$cont]/xsl:value-of select=$cont/ here try to use: xsl:value-of select=../nota[position()]/xsl:value-of select=position()/ /td /tr xsl:variable name=contxsl:value-of select=$cont+1//xsl:variable The above line not needed. /xsl:for-each /table /form /xsl:template ... Here you need to try to break the xsl:for-each blocks. You can write the same code without the xsl:for-each element. If I can't use xsl:variable for the counter, What can I do??? (BTW, this no me friegues sounds like Nicaraguan spanish! is n't? ;-) ) Yes, this no me friegues sounds like Nicaraguan spanish!!! Your friend Thorsten told me about it, and we allways are saying it!! lol. :-DD Best Regards, Antonio Gallardo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]