|
next
|
Subject: Passing variables from JSP to XSLT (Using JSTL)? Author: rahul guru Date: 15 Apr 2005 08:30 AM
|
HI,
Thanks Alberto for your quick response.
Actually, I am using JSTL for this project for converting RSS feeds to voicexml format. So, I am not using any kind of parsers directly.
The XSL file is doing its job. Now, I want to use a string variable, only that would be looked for in the Title tags of RSS (using XPath). This is working if I am using hard coded text. But, I want to pass it through JSP.
Here's some simple code for JSP:
____________
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<!-- <%
//String strRssUrl = request.getParameter("rssurl");
String strRssUrl = "http://rss.cnn.com/rss/cnn_topstories.rss";
%>
-->
<?xml version="1.0"?>
<vxml version="2.0" application="rss_db4.jsp">
<c:set var="xml">
<!DOCTYPE project [
<!ENTITY included SYSTEM "http://rss.cnn.com/rss/cnn_tech.rss">
]>
<root>
&included;
</root>
</c:set>
<form id="rss_db">
<block>
<c:set var="xsl">
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="/xml/WorkingParsing/parse.xsl" />
</xsl:stylesheet>
</c:set>
<x:transform doc="${xml}" docSystemId="foo.xml" xslt="${xsl}"/>
</block>
</form>
</vxml>
______________
Please, also bear with me as I am using XML, XSLT, VoiceXML for the first time.
Thanks,
Rahul.
|
|
|