S
slacker
By clicking a link on a website I set a USERINFO cookie and then I
redirect to a program which ultimately executes an XSL file which
dynamically builds an input form. The input form, while having some non
dynamic hidden INPUT tags, has one hidden INPUT tag that is dynamic. In
the XSL file I attempt to bring this dynamic hidden INPUT tag in via
the following statements:
<xsl:template match="/">
<xsl:value-of select="document('http://localhost/getcookie.jsp')"/>
</xsl:template>
Unfortunately, the XSLT processor produces the following errors:
obhtmlpage.cpp:146: Error: Exception rethrown in
ObHTMLPage::GenerateHTML.
obdgxtxsl.cpp:213: Error: ObDgxtTransform
obdgxtxsl.cpp:153: Error: ObCallDgxtTransform
obdgxtxsl.cpp:32: Error: 0: syntax error at line 1, col 49: syntax
error
obdgxtxsl.cpp:32: Error: 0: xpl_document: error parsing
http://localhost/getcookie.jsp
Below is the getcookie.jsp. I thought I was being straight forward with
this. But I'm confused as to what the processor is talking about; the
XSL above or the JSP below? What does it mean line 1 column 49? Any and
all help is appreciated, thanks.
P.S. - I know I removed " + cookievalue + " below in lieu of the non
dynamic which you see, but even that failed. :-( I also tried
xsl:copy-to and import with this fixed code, but to no avail. Again,
any and all help is appreciated.
<%@ page import="javax.servlet.http.Cookie"
%><%
Cookie info = null;
Cookie[] cookies = request.getCookies();
for (int i=0; i < cookies.length; i++) {
info = cookies;
String cookiename = info.getName();
String cookievalue = info.getValue();
if (cookiename.equals("USERINFO")) {
%>
<input type="hidden" name="varuserinfo" id="varuserinfo"
value="cookievalue"></input>
<% }
}
%>
I'm not really fluent in XML/XSL/XSLT but need to come up with a way
of removing
a set of radio buttons on an XSL produced form. I thought, good, I'll
set a cookie and somehow use that value in the value clause of a hidden
HTML INPUT tag. Hence the so
called "dynamically" generated HTML tag which I tought would be
considered well formed because I gave it an ending INPUT tag.
I also thought initially that maybe I could just have a javascript
extract the cookie value via an ONLOAD statement in a BODY tag, but
then I couldn't figure out the XSL like syntax I would need to make use
of this javascript variable. So more poking around on the internet led
me to the XSL:value-of statement below and copy-of and import
statements with the document parameter and I thought, okay, this looks
promising. But no such luck.
Nelson
redirect to a program which ultimately executes an XSL file which
dynamically builds an input form. The input form, while having some non
dynamic hidden INPUT tags, has one hidden INPUT tag that is dynamic. In
the XSL file I attempt to bring this dynamic hidden INPUT tag in via
the following statements:
<xsl:template match="/">
<xsl:value-of select="document('http://localhost/getcookie.jsp')"/>
</xsl:template>
Unfortunately, the XSLT processor produces the following errors:
obhtmlpage.cpp:146: Error: Exception rethrown in
ObHTMLPage::GenerateHTML.
obdgxtxsl.cpp:213: Error: ObDgxtTransform
obdgxtxsl.cpp:153: Error: ObCallDgxtTransform
obdgxtxsl.cpp:32: Error: 0: syntax error at line 1, col 49: syntax
error
obdgxtxsl.cpp:32: Error: 0: xpl_document: error parsing
http://localhost/getcookie.jsp
Below is the getcookie.jsp. I thought I was being straight forward with
this. But I'm confused as to what the processor is talking about; the
XSL above or the JSP below? What does it mean line 1 column 49? Any and
all help is appreciated, thanks.
P.S. - I know I removed " + cookievalue + " below in lieu of the non
dynamic which you see, but even that failed. :-( I also tried
xsl:copy-to and import with this fixed code, but to no avail. Again,
any and all help is appreciated.
<%@ page import="javax.servlet.http.Cookie"
%><%
Cookie info = null;
Cookie[] cookies = request.getCookies();
for (int i=0; i < cookies.length; i++) {
info = cookies;
String cookiename = info.getName();
String cookievalue = info.getValue();
if (cookiename.equals("USERINFO")) {
%>
<input type="hidden" name="varuserinfo" id="varuserinfo"
value="cookievalue"></input>
<% }
}
%>
I'm not really fluent in XML/XSL/XSLT but need to come up with a way
of removing
a set of radio buttons on an XSL produced form. I thought, good, I'll
set a cookie and somehow use that value in the value clause of a hidden
HTML INPUT tag. Hence the so
called "dynamically" generated HTML tag which I tought would be
considered well formed because I gave it an ending INPUT tag.
I also thought initially that maybe I could just have a javascript
extract the cookie value via an ONLOAD statement in a BODY tag, but
then I couldn't figure out the XSL like syntax I would need to make use
of this javascript variable. So more poking around on the internet led
me to the XSL:value-of statement below and copy-of and import
statements with the document parameter and I thought, okay, this looks
promising. But no such luck.
Nelson