This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > May 2006 > From an XSL file, what is the best way to process a cookie?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
From an XSL file, what is the best way to process a cookie?
|
|
| slacker 2006-05-24, 7:16 pm |
| 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 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[i];
String cookiename = info.getName();
String cookievalue = info.getValue();
if (cookiename.equals("USERINFO")) {
%>
<input type="hidden" name="varuserinfo" id="varuserinfo"
value="cookievalue"></input>
<% }
}
%>
Nelson
| |
|
|
slacker wrote:
> 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:
<snip>
That is in a direct connection with CSS stylesheets and page layout?
;-)
Ask again at <comp.text.xml>
P.S. AFAIK XSL templates deals with the source XML document nodes to
produce output stream /to/ UA. So it has no idea about cookies,
document, window and other things as it did not reach it yet. From the
other side you may be talking about some jsp extensions for XSLT.
Anyway, ask at <comp.text.xml>
| |
| Harlan Messinger 2006-05-24, 7:16 pm |
| VK wrote:
> slacker wrote:
> <snip>
>
> That is in a direct connection with CSS stylesheets and page layout?
As someone once asked me when I gave a similar response: Where do you
see "CSS" in the name of the newsgroup?
XSL does, after all, stand for "Extensible *Stylesheet* Language". And,
yes, it's very *much* used for page layout, and correctly so in terms of
generating the final HTML.
| |
|
| Harlan Messinger wrote:
> As someone once asked me when I gave a similar response: Where do you
> see "CSS" in the name of the newsgroup?
Group created: 1997
>From the ciwas charter: <q>This unmoderated news group is intended for
the discussion of Web style sheets.</q>
You want to tell me that "Web style sheets" above doesn't mean
Cascading Style Sheets?
> XSL does, after all, stand for "Extensible *Stylesheet* Language". And,
> yes, it's very *much* used for page layout, and correctly so in terms of
> generating the final HTML.
So you mean that ciwas is ready to deal with XSLT transformers, XPath,
namespaces, internal and external DTD's (the real one) and validation
schemas? That is a challenging statement - but I do /not/ say that it's
wrong. That would be a great move actually. If you have a consensus
with this group cabbal, then just roll. :-)
| |
| Harlan Messinger 2006-05-24, 11:15 pm |
| VK wrote:
> Harlan Messinger wrote:
>
> Group created: 1997
> the discussion of Web style sheets.</q>
>
> You want to tell me that "Web style sheets" above doesn't mean
> Cascading Style Sheets?
Why would it be clear to you that a newsgroup's purpose is more
restrictive than its name implies? XSL documents are stylesheets, by
definition, and they are used to style documents on the web. On the
contrary, I would have expected that if only CSS were to be discussed,
this would be c.i.w.a.css.
>
>
> So you mean that ciwas is ready to deal with XSLT transformers, XPath,
> namespaces, internal and external DTD's (the real one) and validation
> schemas? That is a challenging statement
Why? What kind of "readiness" is entailed?
- but I do /not/ say that it's
> wrong. That would be a great move actually. If you have a consensus
> with this group cabbal,
Not a requirement. Unmoderated newsgroups don't have owners.
> then just roll. :-)
| |
| ironcorona 2006-05-24, 11:15 pm |
| VK wrote:
> Harlan Messinger wrote:
>
> Group created: 1997
> the discussion of Web style sheets.</q>
You might want to read question 2 in the charter
http://www.faqs.org/faqs/www/stylesheets/newsgroup-faq/
02: ===== Q & A =====
Q: What kinds of posts are acceptable in this news group ?
A: Topics for this news group include:
* How to achieve a particular effect with style sheets,
* The relative advantages of different style sheet languages,
* Specifications versus implementations,
* Bugs and limitations in implementations, and
* Questions on XSL related subjects.
--
Brian O'Connor (ironcorona)
| |
|
|
ironcorona wrote:
> You might want to read question 2 in the charter
> http://www.faqs.org/faqs/www/stylesheets/newsgroup-faq/
Newsgroup FAQ are not a part of the group charter neither they are an
obligatory part of a newsgroup. This is an optional convenience info
source prepared by group volunteers. In the aspect of OT topics FAQ can
further clarify the group charter but it is not allowed to redefine
/overrride the charter.
The group charter is made by "IRA licence" : "once in, never out". Once
stored in news.announce.newgroups, the charter cannot be changed. If
a large amount of posts do not fit into newsgroup charter and there is
not another group better suited for such posts, anyone can initiate the
CFV (Call For Votes) process to create new "Big 8" group with the
corresponding charter.
ciwas charter is here:
<http://groups.google.com/group/comp...ba09874ea4d6fe9>
If XML+XSL transformations (XSLT) topics do fit into it (which would be
greate) then the problem is solved.
| |
| slacker 2006-05-30, 6:43 pm |
| Pardon me, my bad. My question has been reposted to
microsoft.public.xsl, but I will use your suggested group as well.
Apologies for the inconvienence.
Nelson
| |
|
| VK wrote:
>
> ciwas charter is here:
> <http://groups.google.com/group/comp...ba09874ea4d6fe9>
>
> If XML+XSL transformations (XSLT) topics do fit into it (which would
> be greate) then the problem is solved.
I'm not sure what the fuss is about.
> At this time, the most popular stylesheet language is CSS1 (Cascading
> Style Sheets, level 1), but it is expected that other languages will
> also be supported in the future.
That seems quite unambiguous; the newsgroup is for discussion of
stylesheets as used on the web, independent of language.
Meanwhile, if you think it would be "greate" if this group covered XSLT,
then why where you whingeing to the effect that the OP's inquiry was
off-topic, just a few posts back?
You said:
> That is in a direct connection with CSS stylesheets and page layout?
--
Jack.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|