You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Dan Robinson <dr...@dnai.com> on 2002/07/16 22:55:47 UTC
More XSL How-to questions
I have been able to get the XSLTService to work with assistance :).
Now I am trying to integrate Velocity templates with my XML so that I
can get, for example the correct URI for images -
<signaturePhoto>$content.getURI("images/smalldown.jpg")</signaturePhoto>
or something.
I've tried using VelocityXslTemplate which seems to offer the
functionality that I'm looking for, but I can't make head nor tail of it.
I created a xslt2.java:
public class xslt2 extends VelocityScreen
{
public void doBuildTemplate( RunData data, Context context )
{
data.setLayout("VelocityXslLayout");
data.getTemplateInfo().setLayoutTemplate("/xslt2.vm");
}
}
and then tried putting the xml in the LayoutTemplate and the XSL in the
Screen (as seemed to be imlied in the VelocityXslLayout java doc - but
nothing works as expected. Can someone explain how to use this - or if
this is not the best way what is?
Thanks,
Dan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Timestamp problem with postgresql
Posted by Christine Keim <im...@ycn.com>.
Hija,
i'm using postgresql with tdk 2.1, i have a bytea fixed jar
and all worked fine till i wanted to get the values of a Timestamp
from the DB.
Date works fine, even STORING Dates as Timestamps works. Only when
i retrieve Objects with the Peers, a Method returning a Date where
on the DB a Timestamp is used, returns null (even the
TurbineUser.getCreated() - Method).
Well, i tried to do a simple query where i got back a single timestamp with
a peer.
Code is the following:
Vector vec = KnowledgeObjectPeer.executeQuery("SELECT created FROM
knowledge_object WHERE id = 100");
if (!vec.isEmpty())
{
Record rec = (Record) vec.firstElement();
Value val = rec.getValue("created");
try
{
System.out.println("String-->" + val.toString());
System.out.println("date-->" + val.asDate());
}
catch (DataSetException e)
{
e.printStackTrace();
}
the value is fine when i use the method toString() on it, but the method
asDate() throws a DataSetException :
Bad date value - Java Timestamp Objects cannot be earlier than 1/1/70
Now i thought, maybe this is a year2k bug, and i set the date to
1999something.
but also then this exception occurs. Anyone got a clue? I need the timestamp
on the DB, and i would rather prefer keeping the value in one field than
splitting it up in 2 (one date and one time)
I got the feeling this is all a driver-problem, if someone knows and
perhaps has a driver where the problem's fixed,
i would really appreciate a link to download it ^^
tia, Christine
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Torque Problems with bytes[]
Posted by Adam Greene <ag...@romulin.com>.
I have a table that uses VARBINARY (more precisely, uniqueids in MSSQL-2000)
as Primary Key (it is for security reasons, we want a unique identifier that
expires in 12 hours). Torque cannot generate the correct code for it. The
files are attached. The offending line numbers are:
BaseOnlineentries:
Line 82
Line 429
Line 437
BaseOnlineentriesPeer:
Line 238
I can fix the code myself, but I would like to fix Torque too and I'm kind
of new to fixing Torque, I know how to use it, just not where what is in the
source code.
Adam Greene
ROMulin Group Inc
885 Main St, Suite 16
Moncton, NB
E1C 1G5
Ph: (506) 863-1014 x4
Fx: (506) 854-6886
http://www.romulin.com/
-----Original Message-----
From: Dan Robinson [mailto:drob@dnai.com]
Sent: Wednesday, July 17, 2002 3:08 PM
To: Turbine Users List
Subject: Re: More XSL How-to questions -- I'm still stuck, any takers?
Folks,
I would VERY much like to get over this hump. I want to use templates
to generate and transform XML - not just read an XML and XSL file off
the disk and do a transformation. I want to do this with XSL - not
anything else. I will be happy to write up how-to notes for
distribution once I understand how it all works.
Thanks,
Dan
Dan Robinson wrote:
> I have been able to get the XSLTService to work with assistance :).
> Now I am trying to integrate Velocity templates with my XML so that I
> can get, for example the correct URI for images -
>
> <signaturePhoto>$content.getURI("images/smalldown.jpg")</signaturePhoto>
>
> or something.
>
> I've tried using VelocityXslTemplate which seems to offer the
> functionality that I'm looking for, but I can't make head nor tail of
> it.
> I created a xslt2.java:
>
> public class xslt2 extends VelocityScreen
> {
> public void doBuildTemplate( RunData data, Context context )
> {
> data.setLayout("VelocityXslLayout");
> data.getTemplateInfo().setLayoutTemplate("/xslt2.vm");
> }
> }
>
> and then tried putting the xml in the LayoutTemplate and the XSL in
> the Screen (as seemed to be imlied in the VelocityXslLayout java doc -
> but nothing works as expected. Can someone explain how to use this -
> or if this is not the best way what is?
>
> Thanks,
>
> Dan
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
Re: More XSL How-to questions -- I'm still stuck, any takers?
Posted by Dan Robinson <dr...@dnai.com>.
Folks,
I would VERY much like to get over this hump. I want to use templates
to generate and transform XML - not just read an XML and XSL file off
the disk and do a transformation. I want to do this with XSL - not
anything else. I will be happy to write up how-to notes for
distribution once I understand how it all works.
Thanks,
Dan
Dan Robinson wrote:
> I have been able to get the XSLTService to work with assistance :).
> Now I am trying to integrate Velocity templates with my XML so that I
> can get, for example the correct URI for images -
>
> <signaturePhoto>$content.getURI("images/smalldown.jpg")</signaturePhoto>
>
> or something.
>
> I've tried using VelocityXslTemplate which seems to offer the
> functionality that I'm looking for, but I can't make head nor tail of
> it.
> I created a xslt2.java:
>
> public class xslt2 extends VelocityScreen
> {
> public void doBuildTemplate( RunData data, Context context )
> {
> data.setLayout("VelocityXslLayout");
> data.getTemplateInfo().setLayoutTemplate("/xslt2.vm");
> }
> }
>
> and then tried putting the xml in the LayoutTemplate and the XSL in
> the Screen (as seemed to be imlied in the VelocityXslLayout java doc -
> but nothing works as expected. Can someone explain how to use this -
> or if this is not the best way what is?
>
> Thanks,
>
> Dan
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>