cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leo leonid <...@leonid.de>
Subject Re: Java PetStore sample - alternative view
Date Mon, 17 Mar 2003 18:48:13 GMT

On Montag, März 17, 2003, at 06:36  Uhr, Christopher Oliver wrote:

> leo leonid wrote:
>> excellent! so I can go on with checkout, order, shiping, etc...
>>> Does Xsp have some way of doing number formatting? The numeric  
>>> values you receive from JavaScript are of type java.lang.Double.
>> Yes probably there is already a logicsheet for this, I try to avoid  
>> <xsp:logic/>. Number formating is also possible with XSL  
>> <xsl:value-of select="format-number (aNumber, '###,###.##')"/>
>
> Do you think it makes sense to add xsl functions to the JXPath context  
> used by the jpath logic sheet, so that you can call them directly from  
> jpath, e.g <jpath:value-of select ="format-number(/totalCost,  
> '###,###.##')"/> ?

no, not necessarily, numbers can be formated already with the  
generator, using a logicsheet or later
with the xsl-tranformermation step.
>
>> But something really ugly - where I really can't imagine an elegant  
>> solution with XSP or XSL - is HTML in the DB. The only reasonable  
>> solution would be restructuring the DB, but then it isn't THE  
>> petstore anymore. hm?? so where should we solve this problem?
>
> I think the original author was trying to make a direct comparison to  
> the M$ Petshop example, which has html in the DB. I think we can and  
> should remove that. IIRC IBatis JPetstore version 1
> http://prdownloads.sourceforge.net/ibatisjpetstore/jpetstore-src-1-2- 
> 3.zip?download
> has the proper design.
>

I'm not so good in history, but I thought the original petstore has  
always been a part of SUN's blueprint program, teaching design patterns  
(obviously not DB-Design). I looked on my old ULTRA1 and actually found  
a petstore v.1.1 from early 2001. The data for populating the DB is  
pretty much the same as in our example (you can see it on my server  
'oracle.sql'). So for traditional reasons I'd say we should keep it, no?

>
> Regards,
>
> Chris
>
>


Mime
View raw message