[Home] [By Thread] [By Date] [Recent Entries]


It helps to explain why you are finding this problematic. I think it's just
 
<xsl:tempate match="execute-query">
$sql = '<xsl:value-of select="."/>';
</xsl:template>
 
Everything else is handled automatically by the built-in template rules.
 
Michael Kay
http://www.saxonica.com/


From: LUKE [mailto:luke@t...]
Sent: 03 April 2006 04:22
To: xml-dev@l...
Subject: How to transfer xml to code by xslt?

XML Document:
 
<logic>
if ($a==1){
<execute-query>
<![CDATA[
SELECT * FROM address WHERE id =$CGI_paraname
]]>
</execute-query>
}else{
<execute-query>
<![CDATA[
SELECT * FROM address2 WHERE id =$CGI_paraname
]]>
</execute-query>
}
</logic>

I want to transfer to using *.xsl.
 
if ($a==1){
$sql='SELECT * FROM address WHERE id =$CGI_paraname';
}else{
$sql='SELECT * FROM address2 WHERE id =$CGI_paraname';
}


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member