[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hello
I'm pushing xml through xsl and trying to have php code.
Can anyone help and tell me what i'm doing wrong in my xsl? (here comes just the problematic part)
<xsl:choose>
<xsl:when test="CASE1">
<xsl:text>
mysql_query("</xsl:text><xsl:value-of select='concat("SET ","@","index=LAST_INSERT_ID()")' /><xsl:text>");
$index="@index";</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="CASE2">
<xsl:text>$index='20'</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>$index='0';</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
</xsl:text>
<xsl:text>mysql_query("</xsl:text><xsl:value-of select='concat("replace into table (index,variable) values ('",$index,"','",$variable,"')")' /><xsl:text>");</xsl:text>
After XSLT process i is said that variable index has not been declared. Variable called variable has been declared elsewhere.
Can anyone help me out?
[xsl] XSL generating PHP/MySQL
Subject: [xsl] XSL generating PHP/MySQL From: Riku Riikonen <riku.riikonen@xxxxxx> Date: Thu, 27 Sep 2007 22:28:07 +0300 |
Hello
I'm pushing xml through xsl and trying to have php code.
Can anyone help and tell me what i'm doing wrong in my xsl? (here comes just the problematic part)
<xsl:choose>
<xsl:when test="CASE1">
<xsl:text>
mysql_query("</xsl:text><xsl:value-of select='concat("SET ","@","index=LAST_INSERT_ID()")' /><xsl:text>");
$index="@index";</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="CASE2">
<xsl:text>$index='20'</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>$index='0';</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
</xsl:text>
<xsl:text>mysql_query("</xsl:text><xsl:value-of select='concat("replace into table (index,variable) values ('",$index,"','",$variable,"')")' /><xsl:text>");</xsl:text>
After XSLT process i is said that variable index has not been declared. Variable called variable has been declared elsewhere.
I tried to use following <xsl:variable name="index">$index</xsl:variable> , but it didn't work.
Can anyone help me out?
BR Riku
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting variable yet most, Steve | Thread | RE: [xsl] XSL generating PHP/MySQL, Joe Fawcett |
[xsl] Getting variable yet most imm, Steve | Date | RE: [xsl] XSL generating PHP/MySQL, Joe Fawcett |
Month |