473,378 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

From an XSL file, what is the best way to process a cookie?

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

May 24 '06 #1
8 1651
VK

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>

May 24 '06 #2
VK wrote:
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?


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.
May 24 '06 #3
VK
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: 1997From 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. :-)

May 24 '06 #4
VK wrote:
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?


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.
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


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. :-)

May 25 '06 #5
VK wrote:
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 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)
May 25 '06 #6
VK

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.infosystems.www.authoring.images/browse_frm/thread/9819da00c670fd84/8ba09874ea4d6fe9>

If XML+XSL transformations (XSLT) topics do fit into it (which would be
greate) then the problem is solved.

May 25 '06 #7
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

May 30 '06 #8
VK wrote:

ciwas charter is here:
<http://groups.google.com/group/comp.infosystems.www.authoring.images/browse_frm/thread/9819da00c670fd84/8ba09874ea4d6fe9>

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.
May 30 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dan Stromberg | last post by:
If I wanted to write a python script that performs basic auth, gets a cookie, and then does an http POST using the cookie for authentication, what would be the best python API to write to? Does...
20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
1
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
2
by: Christopher | last post by:
Hi all, Sorry if this is a silly question but I've been having a heck of a hard time with it and hope somebody here can lend me a hand. I have a site with a news pages and I'd like the...
10
by: EnjoyNews | last post by:
I have a php site I have an include line called "include 'Cookie.php';" In this Cookie.php file I have these codes. <?php $conn = mysql_connect("$db", "$user", "$pass");...
4
by: Vasanth | last post by:
Hi: I am using Sun JdbcOdbcDriver to access MS-Access from Java client on Windows platform. We are in the process of migrating from Win to Solaris and AIX platform. MS-Access will continue to...
3
by: Yul | last post by:
Hi, We are in the process of designing an ASP.NET app, where a user will enter some 'Customer ID' to be queried in the database. If the ID is valid, several stored procedures will be called to...
2
by: slacker | last post by:
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...
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am thinking about doing this since I got several cases that some of our internal users open more than one browser at the same time from our server. When one of the transactions was not...
0
by: deneb | last post by:
Hello all? When I restart the page or just logout the page, cookie file is deleted automatically. What's wrong with me?? here is my code. ' If I success in Login process, Save user ID in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.