RE: Experiences with Cocoon & Microsoft SQLServer?

2003-02-14 Thread Stephen Ng
Actually I've been using Cocoon with MS SQL Server with no problems
(I've done quite complicated queries, including updates, inserts, and
stored procedures).  Microsoft has a free JDBC driver on their web site
which works fine.

--Steve 


> -Original Message-
> From: Geoff Howard [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, February 14, 2003 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Experiences with Cocoon & Microsoft SQLServer?
> 
> 
> I haven't used the two together, but there seem to be a fair 
> number of people on the list who do.  I am sure a good deal 
> has to do with the quality of the jdbc driver you use.  I've 
> heard of people having better luck with some commercial 
> drivers than with the jdbc-odbc one.
> 
> Geoff
> 
> > -Original Message-
> > From: Thorsten Scherler [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 14, 2003 2:22 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Experiences with Cocoon & Microsoft SQLServer?
> >
> >
> > Hi Felix,
> >
> > I tried it but didn't like the result!
> >
> > e.g. the "Select * from table" were working fine, but I had 
> trouble with
> >   "Update", "insert into",
> >
> > Despite that I never got it working that I could got the 
> data "where 
> > date=". I wasn't patient enough 
> to get to 
> > the course.
> >
> > ...but it should work fine because of thje cocoon data layer.
> >
> > Personally I recommend Oracle (if you have the money) or 
> MySQL (pretty 
> > fast ;-)).
> >
> > Don't use the MS SQL stuff (my personal opinion) it's garbage!
> >
> > King regards
> > Thorsten
> >
> >
> >
> > Felix Maeder wrote:
> > > Hi list,
> > >
> > > Does anyone use Cocoon in connection with Microsoft 
> SQLServer in a 
> > > production environment? What are the experiences? Are there any 
> > > known issues with this combination?
> > >
> > > Thanks a lot
> > > -Felix
> > >
> > >
> > > 
> 
> > > -
> > > Please check that your question  has not already been 
> answered in the
> > > FAQ before posting. 
> 
> > >
> > > To 
> unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> > >
> > >
> >
> >
> > 
> -
> > Please check that your question  has not already been 
> answered in the
> > FAQ before posting. 
> 
> >
> > To 
> unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> >
> >
> >
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




XSP's don't use catalogs?

2003-02-07 Thread Stephen Ng
I'm trying to resolve some entities inside an xsp file, but it appears
that xsp's don't use entity catalogs the way other xml files do.

(I'm using Cocoon 2.0.3).

For example, in the standard cocoon distribution, if I modify
cocoon\docs\samples\xsp\hello.xsp to be:




 %ISOnum;
]>
http://apache.org/xsp";>
  
Hello

  This is my first Cocoon page! ½
  
With the help of XSP! and
Constants.COMPLETE_NAME
  

  


and go to http://localhost:8080/cocoon/xsp/hello,

I get "java.net.MalformedURLException: no protocol: ISOnum.pen".

But this works fine if I modify, say, sample-apps.xml.

How can I define and reference external entities in an XSP?

Thanks,

Steve

Stephen Ng
Software Engineer
Lumigent Technologies, Inc
 
 

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: XSP create dynamic an element

2002-12-03 Thread Stephen Ng
Try something like:


imageDisplay


--Steve
> -Original Message-
> From: Cocoon User [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 03, 2002 6:42 AM
> To: [EMAIL PROTECTED]
> Subject: XSP create dynamic an element
> 
> 
> 
> i call an .xsp page like
> http://.../viewer.xsp?image=test.gif
> 
> i send the image file name
> but i dont know how to create an image element with dynamic 
> content for the src attribute
> 
> 
> i have the follow .xsp code
> 
> 
>   http://apache.org/xsp/xscript/1.0";
> xmlns:xsp="http://apache.org/xsp";>
> 
>   String imageDisplay = request.getParameter("image");
> 
> 
>   
> 
>   how can i create here an  element with src attribute the
> content of imageDisplay string variable?
> 
>   exaple  height="100"/>
> 
>   
> 
> 
> 
> 
> 
> thnx
> Stavros Kounis
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Poor performance of document() in XSL [Was: Re: simpel cocoon question]

2002-11-06 Thread Stephen Ng
> > I say,
> > document() is good for rapid prototyping, but is a poor choice for 
> > final deployment for performance reasons. Use aggregation instead.
> 
> The Cocoon developers recommend to use aggregation or 
> xinclude because of SoC (XSLT is for transforming, not for 
> aggregating content).

Sure, but I have a big lookup table in an xml file--it seems much more
natural to reference the lookup table from xslt using document rather
than to jam it into my content stream

--Steve

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon 2.0.3, Resin 2.1.4, core.log, and StoreJanitorImpl

2002-10-29 Thread Stephen Ng
Title: Message



Those 
are just debug messages; I think you need to bump up your logging level in 
logkit.xconf to ERROR to hide those messages:
 
            
  
    
  
        
          
    
  
      
    
  
      
    
  
  
The 
first set of messages I think you can get rid of by editing web.xml and bumping 
up the log-level there.
 
Steve

  
  -Original Message-From: Jonathan 
  Lancelle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 29, 
  2002 3:23 AMTo: cocoon-usersSubject: Cocoon 2.0.3, Resin 
  2.1.4, core.log, and StoreJanitorImplI'm running 
  Cocoon 2.0.3 with Resin 2.1.4. It seems to work fine. It used to die 
  unexpectedly quite often until I tweaked a few parameters in my resin servlet 
  engine conf file. It was improperly configured to the constraints imposed upon 
  me by the web host being used. But I still noticed many repetitive errors in 
  the Resin server error.log file as the following (just three 
  here):[2002/10/29 01:50:04] DEBUG   (2002-10-29) 
  01:50.04:453   [    ] 
  (/cocoon/status) tcpConnection-8080-0/DefaultLogKitManager: Logger for 
  category sitemap.generator.status not defined in configuration. New Logger 
  created and returned[2002/10/29 01:50:04] DEBUG   
  (2002-10-29) 01:50.04:456   
  [    ] (/cocoon/status) 
  tcpConnection-8080-0/DefaultLogKitManager: Logger for category 
  sitemap.transformer.xslt not defined in configuration. New Logger created and 
  returned[2002/10/29 01:50:04] DEBUG   (2002-10-29) 
  01:50.04:460   [    ] 
  (/cocoon/status) tcpConnection-8080-0/DefaultLogKitManager: Logger for 
  category core.xslt-processor not defined in configuration. New Logger created 
  and returnedSo then I started studying the core.log file of 
  each webapp I am experimenting with and noticed when a URL is selected via the 
  sitemap, for each access, I get a head of info as follows (I placed the 
  '<***>' in a few spots below):REQUEST: 
  /cocoon/statusCONTEXT PATH: /cocoonSERVLET PATH: /statusPATH 
  INFO: nullREMOTE HOST: 63.202.<***>.<***>REMOTE 
  ADDRESS: 63.202.<***>.<***>REMOTE USER: nullREQUEST 
  SESSION ID: nullREQUEST PREFERRED LOCALE: en_USSERVER HOST: 
  www.<***>.netSERVER PORT: 8080METHOD: GETCONTENT LENGTH: 
  -1PROTOCOL: HTTP/1.1SCHEME: httpAUTH TYPE: BasicCURRENT 
  ACTIVE REQUESTS: 1REQUEST PARAMETERS:HEADER 
  PARAMETERS:PARAM: 'Host' VALUES: 
  '[www.<***>.net:8080]'PARAM: 'User-Agent' VALUES: '[Mozilla/5.0 
  (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 
  Netscape/7.0]'PARAM: 'Accept' VALUES: 
  '[text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1]'PARAM: 
  'Accept-Language' VALUES: '[en-us, en;q=0.50]'PARAM: 'Accept-Encoding' 
  VALUES: '[gzip, deflate, compress;q=0.9]'PARAM: 'Accept-Charset' VALUES: 
  '[ISO-8859-1, utf-8;q=0.66, *;q=0.66]'PARAM: 'Keep-Alive' VALUES: 
  '[300]'PARAM: 'Connection' VALUES: '[keep-alive]'PARAM: 'Referer' 
  VALUES: '[http://www.<***>.net:8080/cocoon/]'SESSION 
  ATTRIBUTES:Then many lines such as the following occur 
  (only three here):DEBUG   (2002-10-29) 
  01:50.04:408   [core.manager] (/cocoon/status) 
  tcpConnection-8080-0/ResourceLimitingPool: Got a 
  org.apache.cocoon.components.pipeline.CachingEventPipeline from the 
  pool.DEBUG   (2002-10-29) 01:50.04:408   
  [core.manager] (/cocoon/status) tcpConnection-8080-0/ResourceLimitingPool: Got 
  a org.apache.cocoon.components.pipeline.CachingStreamPipeline from the 
  pool.DEBUG   (2002-10-29) 01:50.04:451   
  [core.manager] (/cocoon/status) tcpConnection-8080-0/DefaultComponentFactory: 
  ComponentFactory creating new instance of 
  org.apache.cocoon.generation.StatusGenerator.Then the 
  fun startsmany, many lines of the following (only six 
  listed):DEBUG   (2002-10-29) 01:50.08:842   
  [core.store.janitor] (Unknown-URI) Unknown-thread/StoreJanitorImpl: JVM total 
  Memory: 24309760DEBUG   (2002-10-29) 01:50.08:842   
  [core.store.janitor] (Unknown-URI) Unknown-thread/StoreJanitorImpl: JVM free 
  Memory: 5772608DEBUG   (2002-10-29) 01:50.08:842   
  [core.store.janitor] (Unknown-URI) Unknown-thread/StoreJanitorImpl: Memory is 
  low = falseDEBUG   (2002-10-29) 01:50.18:850   
  [core.store.janitor] (Unknown-URI) Unknown-thread/StoreJanitorImpl: JVM total 
  Memory: 24309760DEBUG   (2002-10-29) 01:50.18:850   
  [core.store.janitor] (Unknown-URI) Unknown-thread/StoreJanitorImpl: JVM free 
  Memory: 5727272DEBUG   (2002-10-29) 01:50.18:851   
  [core.store.janitor] (Unknown-URI) Unknown-thread/StoreJanitorImpl: Memory is 
  low = falseThey come in groups of three, and are created at 
  fairly regular intervals (10 secs on my particular server.) Cocoon seems to 
  run fine. The only concern is it may not be operating as efficiently as it 
  could, and also fills up the log files real quick. Is there a paramet

RE: CaheValidity & toString()

2002-10-28 Thread Stephen Ng
Okay, I think I've found the problem with my aggregate caching.

I have an xsp, and I use the cocoon:/ protocol to map:aggregate that xsp.  Something 
like the usual:


 
  
 
...

The symptom is that if I ask for 

http://foo?param=1

and then ask for that same url again, everything appears to be read from the cache.

But, if I ask for

http://foo?param=2

and then ask for  

http://foo?param=1

according the logs, Cocoon is re-aggregating the cached content of my xsp, rather than 
using the cached aggregated value.  (This is a problem because I have quite a few 
transformations that take place after that aggregation, and they all get re-run 
needlessly).

The problem appears to be that the aggregated content has a key which is based upon 
the src string (cocoon:/from-an-xsp.xml) which, in this case, is identical--it doesn't 
bother to ask the xsp for its key value.

A workaround for this is to make the ContentAggregator key based upon the source's 
getLastModified() number (which, at least, is based upon hash of xsp's validity object 
[SitemapSource:refresh()]).

In ContentAggregator:
public long generateKey() {
// ...
if (current.getLastModified() == 0) {
return 0;
} else {
  // ...
key += current.getLastModified();  // <-- ADD THIS LINE
}
// ...

Does the problem & solution make sense?  If so, should I submit a patch?

Thanks,

Steve

> -Original Message-
> From: Stephen Ng 
> Sent: Monday, October 28, 2002 10:42 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: CaheValidity & toString()
> 
> 
> I am running into this same problem (I think) but I'm 
> confused as to what to do about it.
> 
> I have xsp's with generateKey() and 
> generateValidity()methods, and when I put the xsp in an 
> aggregate, cocoon re-aggregates every time, instead of used 
> the cached aggregated value.  The symptom is that it says 
> that the TimeStamp Validity is not the same for my aggregated 
> component.
> 
> I'm using my own CacheValidity, which does have a toString() method.
> 
> I've tried replacing my xsp with the cacheable.xsp from the 
> cocoon sample application, and I get the same problem--the 
> aggregate isn't cached.
> 
> Is there some other method I need to implement somewhere?
> 
> Thanks,
> 
> Steve
> 
> > -Original Message-
> > From: David LAGARDERE [mailto:dlagardere@;yahoo.fr]
> > Sent: Friday, September 13, 2002 3:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: CaheValidity & toString()
> > 
> > 
> > Hello.
> > 
> > Sorry if the following was documented. However, after
> > many hours I spent on it, I found interesting to
> > describe what I've found about Caching.
> > 
> > I would like to have your opinion on a solution I've
> > found to my troubles with Cacheability of aggregated
> > content (see the previous mails I've sent).
> > 
> > The problem I had was the fact that Cocoon didn't
> > cache a StreamPipeline containing an aggregator
> > composed of my own Cacheable Generator : the log
> > told me the TimeStamp Validity of the Pipeline changed
> > everytime I requested the page whereas my generator was 
> always valid !
> > 
> > As each part of an aggregator is a SitemapSource
> > instance, the key and the validity of the pipeline are
> > built upon the SitemapSource last modification date.
> > This date is the concatenation of the Pipeline Cached
> > Key string value and the Pipeline Validity string
> > value.
> > The Pipeline Validity is a Map which associate a
> > Component Cached Key with its validty. Its string 
> > representation is the string representation of each pair 
> > {key, value}, that is , a call to the toString() method on 
> > both Component cached key and Component validity objects. 
> > As a consequence, every validity may overload the
> > toString() method returning a relevant value otherwise
> > the returned value will be the memory address of the
> > object, which of course, can't be taken as a relevant
> > value.
> > 
> > Please tell me if I'm wrong, but this is the only way
> > I've found to have my CachingStreamPipeline cached !
> > 
> > 
> > David Lagardere
> > 
> > 
> > ___
> > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en
> > français ! Yahoo! Mail : http://fr.mail.yahoo.com
> > 
> > 
> ---

RE: CaheValidity & toString()

2002-10-28 Thread Stephen Ng
I am running into this same problem (I think) but I'm confused as to what to do about 
it.

I have xsp's with generateKey() and generateValidity()methods, and when I put the xsp 
in an aggregate, cocoon re-aggregates every time, instead of used the cached 
aggregated value.  The symptom is that it says that the TimeStamp Validity is not the 
same for my aggregated component.

I'm using my own CacheValidity, which does have a toString() method.

I've tried replacing my xsp with the cacheable.xsp from the cocoon sample application, 
and I get the same problem--the aggregate isn't cached.

Is there some other method I need to implement somewhere?

Thanks,

Steve

> -Original Message-
> From: David LAGARDERE [mailto:dlagardere@;yahoo.fr] 
> Sent: Friday, September 13, 2002 3:54 PM
> To: [EMAIL PROTECTED]
> Subject: CaheValidity & toString()
> 
> 
> Hello.
> 
> Sorry if the following was documented. However, after
> many hours I spent on it, I found interesting to
> describe what I've found about Caching.
> 
> I would like to have your opinion on a solution I've
> found to my troubles with Cacheability of aggregated
> content (see the previous mails I've sent).
> 
> The problem I had was the fact that Cocoon didn't
> cache a StreamPipeline containing an aggregator
> composed of my own Cacheable Generator : the log
> told me the TimeStamp Validity of the Pipeline changed 
> everytime I requested the page whereas my generator was always valid !
> 
> As each part of an aggregator is a SitemapSource
> instance, the key and the validity of the pipeline are
> built upon the SitemapSource last modification date.
> This date is the concatenation of the Pipeline Cached
> Key string value and the Pipeline Validity string
> value. 
> The Pipeline Validity is a Map which associate a
> Component Cached Key with its validty. Its string 
> representation is the string representation of each pair 
> {key, value}, that is , a call to the toString() method on 
> both Component cached key and Component validity objects. 
> As a consequence, every validity may overload the
> toString() method returning a relevant value otherwise
> the returned value will be the memory address of the
> object, which of course, can't be taken as a relevant
> value.
> 
> Please tell me if I'm wrong, but this is the only way
> I've found to have my CachingStreamPipeline cached !
> 
> 
> David Lagardere
> 
> 
> ___
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en 
> français ! Yahoo! Mail : http://fr.mail.yahoo.com
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




NotSerializableException

2002-10-24 Thread Stephen Ng
My app runs fine for a while, then starts to cough up
NotSerializableException's like crazy.  I don't see any visible
problems, but throwing and logging all these exceptions can't be good
for my performance.

Has anyone seen this before or has some idea what this might be?  It
looks like an error trying to move stuff from the in-memory cache to the
filesystem?  (BTW I have plenty of disk space).  Could it be because I
have a HashMap in an xsp somewhere which it is trying to serialize?

Thanks,

Steve

[Very long stack trace follows].

ERROR   (2002-10-24) 16:54.32:705   [core.store.transient]
(/xsltcSaxon/data/historyTableData.xml) Thread-11/MRUMemoryStore: Error
storing object on fs
java.io.NotSerializableException:
org.apache.cocoon.environment.wrapper.EnvironmentWrapper
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:182
2)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:47
5)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:182
2)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:47
5)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at java.util.HashMap.writeObject(HashMap.java:807)
at java.lang.reflect.Method.invoke(Native Method)
at
java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:18
59)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1205)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:182
2)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:47
5)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
org.apache.cocoon.util.IOUtils.serializeObject(IOUtils.java:144)
at
org.apache.cocoon.components.store.FilesystemStore.store(FilesystemStore
.java:228)
at
org.apache.cocoon.components.store.MRUMemoryStore.free(MRUMemoryStore.ja
va:325)
at
org.apache.cocoon.components.store.MRUMemoryStore.hold(MRUMemoryStore.ja
va:204)
at
org.apache.cocoon.components.store.MRUMemoryStore.store(MRUMemoryStore.j
ava:184)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:253)
at
org.apache.cocoon.components.source.SitemapSource.toSAX(SitemapSource.ja
va:353)
at
org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.j
ava:148)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:399)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
SerializeNode.java:153)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
nvoke(PreparableMatchNode.java:156)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.java:140)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
PipelinesNode.java:144)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:328)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:293)
at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun
tNode.java:131)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:85)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
nvoke(PreparableMatchNode.java:156)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:109)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.java:140)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo

RE: xsltc w/ 2.0.3

2002-10-23 Thread Stephen Ng
I (religiously) use the stock 2.0.3 jars.

I definitely had to make some changes in my xslt, because of bugs in my
code that xsltc uncovered, but also (I think) because of bugs in xsltc.
(Actually, even though I got my app to run under xsltc, I'm considering
switching to Saxon because of the quirks in xsltc--for example I can't
get xsltc variables to hold a temporary tree).

I think it is important to clear out your tomcat work directory, and to
start with simple transforms and work your way up.  Expect to do some
debugging.

Steve

> -Original Message-
> From: Jeremy Green [mailto:jeremy@;glowbead.com] 
> Sent: Tuesday, October 22, 2002 1:45 PM
> To: [EMAIL PROTECTED]
> Subject: xsltc w/ 2.0.3
> 
> 
> Hello,
> 
> From browsing the list it looks like it is possible to get 
> xsltc working with Cocoon 2.0.3, and I was hoping someone 
> could provide me with just a bit more information.
> 
> I've followed the instructions given here: 
> http://outerthought.net/wiki/Wiki.jsp?page=XSLTC
> 
> My question really boils down to this:  Which jars do I need 
> to have in my WEB-INF/lib directory to make this work 
> correctly?  Do I need to upgrade to new versions of some of 
> the other jars? (Xalan, xerces,
> etc...)
> 
> I'm using Cocoon 2.0.3 with the JBoss-2.4.4_Tomcat-4.0.1-beta bundle.
> 
> I've tried a variety of things and nothing seems to work.  
> Currently I have xsltc-20020723.jar in there, and I get the 
> following Exception back in my browser.
> 
> An error occurred org.apache.cocoon.ProcessingException 
> Exception in creating Transform Handler 
> org.apache.cocoon.ProcessingException:
> Exception in creating Transform Handler: 
> java.lang.NullPointerException Original exception : 
> java.lang.NullPointerException at
> org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransfor
> merHandler(TransformerFactoryImpl.java:640) at 
> org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransfo
> rmerHandler(XSLTProcessorImpl.java:282) at 
> org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransfo
> rmerHandler(XSLTProcessorImpl.java:239) at 
> org.apache.cocoon.transformation.TraxTransformer.setup(TraxTra
> nsformer.java:298) at 
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.se
> tupPipeline(AbstractEventPipeline.java:215) at
> 
> 
> 
> 
> The jboss log contains this error:
> [13:22:34,925,Default] java.lang.ClassCastException: 
> org.apache.xalan.xsltc.compiler.Param
> [13:22:34,925,Default]at
> org.apache.xalan.xsltc.compiler.SymbolTable.addVariable(Symbol
> Table.java:120)
> [13:22:34,926,Default] 
> [13:22:34,926,Default]at
> org.apache.xalan.xsltc.compiler.Variable.parseContents(Variabl
> e.java:141)
> [13:22:34,926,Default] 
> [13:22:34,926,Default]at
> org.apache.xalan.xsltc.compiler.Stylesheet.parseOwnChildren(St
> ylesheet.java:412)
> [13:22:34,926,Default] 
> [13:22:34,926,Default]at
> org.apache.xalan.xsltc.compiler.Stylesheet.parseContents(Style
> sheet.java:394)
> [13:22:34,926,Default] 
> [13:22:34,926,Default]at
> org.apache.xalan.xsltc.compiler.Import.parseContents(Import.java:143)
> [13:22:34,926,Default] 
> 
> 
> Any help would be appreciated.
> 
> Thanks,
> Jeremy
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: xsltc

2002-10-18 Thread Stephen Ng
I got a few of these when I started out.  Make sure you clear out your
work directory, and then try to debug the transforms one by one,
starting with the lowest-level transform.

Steve

> -Original Message-
> From: Kevin O'Neill [mailto:kevin@;rocketred.com.au] 
> Sent: Friday, October 18, 2002 12:37 AM
> To: [EMAIL PROTECTED]
> Subject: Re: xsltc
> 
> 
> Steve,
> 
> > I got xsltc working with 2.0.3 (thanks Vadim...), and even wrote a 
> > short how-to on it: 
> http://outerthought.net/wiki/Wiki.jsp?page=XSLTC.  
> > On my app I get about a 2x speedup over Xalan.
> 
> I followed you instructions (I think :)) but I get 
> 
> FATAL (/esit/data/summary.rdf) CocoonServlet: The Cocoon 
> engine said it failed to process the request for an unknown reason.
> 
> Which isn't all that helpful.
> 
> cocoon.xconf snippit
> 
>  
> 
>class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
>  logger="core.xslt-processor">
>  
>  
>   
> 
> class="org.apache.cocoon.components.xslt.XSLTProcessorImpl" 
>  role="org.apache.cocoon.components.xslt.XSLTProcessor/XSLTC"
>  logger="core.xslt-processor">
>  
>   value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"/>
>   
> 
> sitemap snippit.
> 
> 
>src="org.apache.cocoon.transformation.TraxTransformer" 
> pool-grow="2" pool-max="32" pool-min="8" logger="components">
> false
> 
> false
> false
>   
>src="org.apache.cocoon.transformation.TraxTransformer" 
> pool-max="32" pool-min="16" pool-grow="4">
> false
> 
> false
>  
>   
> org.apache.cocoon.components.xslt.XSLTPro
> cessor/XSLTC
>   
> 
> 
> How does this compare to yours?
> 
> -k.
> 
> -- 
> If you don't test then your code is only a collection of bugs which 
> apparently behave like a working program. 
> 
> Website: http://www.rocketred.com.au/blogs/kevin/
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




xsltc

2002-10-18 Thread Stephen Ng
Title: Message



I got 
xsltc working with 2.0.3 (thanks Vadim...), and even wrote a short how-to on it: 
http://outerthought.net/wiki/Wiki.jsp?page=XSLTC.  
On my app I get about a 2x speedup over Xalan.
 
But 
I'm confused about something.  xsltc generates java code which does the 
transformation.  Where does this .java or .class file live?  I tried 
rummaging around in Tomcat's work directory but didn't find 
anything.
 
Does 
it re-build the translet each time?
 
Thanks,
 
Steve


RE: Xsltc and 2.0.3

2002-09-06 Thread Stephen Ng

The magic words seem to be:

  
 
 
  
  

But if I drop this into the 2.0.3 cocoon.xconf, I get an NPE:

at java.lang.Thread.run(Thread.java:484)
java.lang.NullPointerException
at
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransformerHandler
(TransformerFactoryImpl.java:593)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandle
r(XSLTProcessorImpl.java:282)
at
org.apache.cocoon.components.language.markup.Logicsheet.getTransformerHa
ndler(Logicsheet.java:160)

Should I give up and wait for 2.0.4/2.1 for xsltc?

Thanks,

Steve

> -Original Message-
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, September 06, 2002 9:56 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Xsltc and 2.0.3
> 
> 
> Stephen Ng wrote:
> 
> >Is it possible to plug xsltc into 2.0.3?
> >
> 
> Try following this:
> 
> http://xml.apache.org/cocoon/snippet/snippet-xslt-options.html
> 
> Vadim
> 
> 
> >I tried substituting in sitemap.xmap:
> >
> >   >src="org.apache.cocoon.transformation.TraxTransformer"
> >logger="sitemap.transformer.xsltc"
> >pool-max="32" pool-min="8" pool-grow="2">
> >  false
> >  
> false
> >  false
> > 
> >org.apache.xalan.xsltc.trax.TransformerF
> actoryImpl
> ><
> >/transformer-factory>
> >
> >
> >and adding xsltc-20020723.jar to my lib directory, but it 
> doesn't seem 
> >to do anything (e.g. it doesn't complain if xsltc is 
> missing, or if I 
> >change TransformerFactoryImpl to FooBarImpl).
> >
> >I thought about changing cocoon.xconf:
> >
> >   >class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
> >logger="core.xslt-processor">
> >
> > 
> >  
> >
> >But I'm not sure what I'd put here.
> >
> >Thanks,
> >
> >Steve
> >  
> >
> 
> 
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: xsltc and 2.0.3

2002-09-06 Thread Stephen Ng

> I think  should be
configured in \
> cocoon.xconf and not in the sitemap

Okay, but adding  to cocoon.xconf right after
... doesn't seem to do it either...

> -Original Message-
> From: Stephen Ng 
> Sent: Thursday, September 05, 2002 1:28 PM
> To: '[EMAIL PROTECTED]'
> Subject: xsltc and 2.0.3
> 
> 
> Is it possible to plug xsltc into 2.0.3?
> 
> I tried substituting in sitemap.xmap:
> 
>src="org.apache.cocoon.transformation.TraxTransformer"
> logger="sitemap.transformer.xsltc"
> pool-max="32" pool-min="8" pool-grow="2">
>   false
>   false
>   false
>   
> org.apache.xalan.xsltc.trax.TransformerFa
> ctoryImpl
> 
> 
> and adding xsltc-20020723.jar to my lib directory, but it 
> doesn't seem to do anything (e.g. it doesn't complain if 
> xsltc is missing, or if I change TransformerFactoryImpl to 
> FooBarImpl).
> 
> I thought about changing cocoon.xconf:
> 
>class="org.apache.cocoon.components.xslt.XSLTProcessorImpl" 
> logger="core.xslt-processor">
> 
>  
>   
> 
> But I'm not sure what I'd put here.
> 
> Thanks,
> 
> Steve
> 

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Fwd: tuning

2002-09-05 Thread Stephen Ng

Just found the answer to my first question:  the improved http/1.1 
connector is in Tomcat 4.04:

[B2] Coyote: This release include a completely new HTTP/1.1 connector and 
connector API, called Coyote. This connector provides much improved 
performance and robustness over the default HTTP/1.1 connector.


>Date: Thu, 05 Sep 2002 22:23:04 -0400
>To: [EMAIL PROTECTED]
>From: Stephen Ng <[EMAIL PROTECTED]>
>Subject: tuning
>
>I've been reading through the performance tuning tips and have a couple of 
>questions and comments.
>
>- For optimum performance with Tomcat 4 and Cocoon 2, use the HTTP/1.0 
>connector.
>
>This appears to be due to a bug which has been fixed.
>
>See: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4083.  Was this a 
>bug in Tomcat or Cocoon?  If Tomcat, what version of Tomcat was it fixed in?
>
>- Set the -Xnoclassgc parameter on the Sun JDK 1.3.1!
>
>I believe the argument should be -noclassgc.
>
>- disable resource reloading
>
>I understand I'm supposed to toggle value="true"/>.  But what exactly does this do?  Does it stop checking the 
>timestamp of resource files before loading them?  What do I give up if I 
>turn this on?  (The option isn't documented in the latest cocoon.xconf.)
>
>Thanks,
>
>Steve




-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




tuning

2002-09-05 Thread Stephen Ng

I've been reading through the performance tuning tips and have a couple of 
questions and comments.

- For optimum performance with Tomcat 4 and Cocoon 2, use the HTTP/1.0 
connector.

This appears to be due to a bug which has been fixed.

See: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4083.  Was this a 
bug in Tomcat or Cocoon?  If Tomcat, what version of Tomcat was it fixed in?

- Set the -Xnoclassgc parameter on the Sun JDK 1.3.1!

I believe the argument should be -noclassgc.

- disable resource reloading

I understand I'm supposed to toggle .  But what exactly does this do?  Does it stop checking the 
timestamp of resource files before loading them?  What do I give up if I 
turn this on?  (The option isn't documented in the latest cocoon.xconf.)

Thanks,

Steve



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




xsltc and 2.0.3

2002-09-05 Thread Stephen Ng

Is it possible to plug xsltc into 2.0.3?

I tried substituting in sitemap.xmap:

  
  false
  false
  false
 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl<
/transformer-factory>


and adding xsltc-20020723.jar to my lib directory, but it doesn't seem
to do anything (e.g. it doesn't complain if xsltc is missing, or if I
change TransformerFactoryImpl to FooBarImpl).

I thought about changing cocoon.xconf:

  

 
  

But I'm not sure what I'd put here.

Thanks,

Steve

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Xsltc and 2.0.3

2002-09-05 Thread Stephen Ng

Is it possible to plug xsltc into 2.0.3?

I tried substituting in sitemap.xmap:

  
  false
  false
  false
 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl<
/transformer-factory>


and adding xsltc-20020723.jar to my lib directory, but it doesn't seem
to do anything (e.g. it doesn't complain if xsltc is missing, or if I
change TransformerFactoryImpl to FooBarImpl).

I thought about changing cocoon.xconf:

  

 
  

But I'm not sure what I'd put here.

Thanks,

Steve


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Unit testing xslt

2002-08-29 Thread Stephen Ng

I have unit tests for all my xslt.

I'm not using XSLTUnit (which is a fine program)--in my case, for each
xslt file, I have a one or more test input files and corresponding
reference files which are the expected result when I run the transform.
I use file names/extensions to group them:

myScript.xslt
myScript.simpleTest.xml
myScript.simpleTest.ref
myScript.complexTest.xml
myScript.complexTest.ref

I use a combination of batch jobs and ant scripts to match up the files,
run the tests, and compare the results.

I don't always do test-first--sometimes it's just easier to test your
code inside your app.  So what I often do is write the code, test it in
the app, and then write the tests.  I then back out my change, and run
the tests again.  The tests should fail--if they don't, I've done
something wrong in my test code.  I then reintroduce my changes one bit
at a time, and make sure sure my tests start to succeed again.

I think unit testing xslt's is a great thing.

HTH,

Steve

> -Original Message-
> From: Robert Leftwich [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, August 28, 2002 9:58 PM
> To: [EMAIL PROTECTED]
> Subject: Unit testing xslt
> 
> 
> Given Cocoon's big focus on transforms, I was wondering if 
> anyone is using 
> unit tests and/or test-first design when developing their xslt? I'd 
> appreciate any comments on its effectiveness and what tools 
> you are using 
> (XSLTunit for example?).
> 
> Robert
> 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




nested elements in esql logicsheets

2002-07-10 Thread Stephen Ng

After bashing my head a little trying to figure out how to use dynamic
tag parameters in esql, I finally figured it out and have a few
(constructive, I hope) suggestions.

Documentation:

1. http://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html
contains a lot of information which is pretty important to using
logicsheets, not just for people writing them.  I'd prefer that it be
rewritten to target users, not writers, but at a minimum, *please*
remove (or move) the section on SiLLy--there's precious little doc as it
is on logicsheets, and including a large section on a still-in-design
component is very confusing to those of us getting started.

2. "Also, dynamic tag parameters must be accepted both as constant
strings and as (potentially complex) expressions."

This is, of course, a great great thing, a lifesaver.  But the example
given is:
  

  request.getParameter("format");

  

To use this with esql, you must say:

  

BUT, it's "param" not "parameter"!  Also, it's not at all obvious that
the util and esql namespaces both contain an element named "param"; I
might have been tempted to use "util:param" in my esql sheet.

[That it's "esql:param" is not obvious from looking at esql.xsl--I
attempted to grep for "esql:param" and found nothing.  That's because
the code is written:



Where $prefix (which is only used here!) is hard-coded to "esql"!

]

Code:

1. I could not get  text to show up in the
.log file.  In my sitemap, I have:



In logkit.xconf I have:

http://java.sun.com/docs/books/tutorial/jdbc/basics/complete.html --
getWarnings() is a method of the (private)
connection/statement/resultset object.

Can someone confirm this?

That's all!

--Steve


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: SQLTransformer, multiple execute-query siblings?

2002-06-21 Thread Stephen Ng

After flirting briefly with SQLTransformer, I'm using XSP/ESQL--they
work great.

A couple alternatives might be to create separate pipelines with
SQLTransformer and aggregate them in your sitemap, or to build a single
large union query.

> -Original Message-
> From: Argyn Kuketayev [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, June 21, 2002 10:28 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: SQLTransformer, multiple execute-query siblings?
> 
> 
> it doesn't support two nested queries on the same level of 
> nesting, as far as I remember after looking at C2.0.1 
> sources. I don't think it's fixed.
> 
> Workaround is:
> 1. modify source codes
> 2. use XSP
> 
> I use XSP with ESQL
> 
> > Can someone confirm this, and is there a workaround other
> > than chaining 
> > multiple SQLTransformers with XSLT to generate sub-queries?
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Datasource pooling issue. Connections exceed limit.

2002-06-20 Thread Stephen Ng

Aaron,

I have an app that does quite a bit of data access and haven't noticed
this at all.  BTW, are you using SQLTransformer or esql to get the data?

Steve

> -Original Message-
> From: SANSONE, AARON M [AG-Contractor/1000] 
> [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, June 19, 2002 10:11 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Datasource pooling issue. Connections exceed limit.
> 
> 
> Tom,
> 
> Thanks for your response but this is being done within the 
> Cocoon framework.
> I do not have any Java code running in Cocoon that opens a 
> connection to the
> database.  The Cocoon framework is repsonsible for handling 
> connections for
> me and yet I am still seeing the issue with many connections 
> being created
> in excess of the specified datasource pooling parameters set in the
> cocoon.xconf.
> 
> Any other ideas?
> 
> -Aaron
> 
> > -Original Message-
> > From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 8:06 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Datasource pooling issue. Connections exceed limit.
> > 
> > 
> > SANSONE, AARON M [AG-Contractor/1000] wrote:
> > > We are using a build of Cocoon from early March.  We 
> > connect to an Oracle
> > > database and have specified the connection pooling to use a 
> > minimum of 5
> > > connections and a max of 10 connections.  What we are 
> > seeing, is that our
> > > number of connections to Oracle grows with each new 
> > connection from Cocoon
> > > to our database way past 10 (we currently are looking at 55 
> > connections). 
> > > 
> > > Has anyone experienced this issue in either older versions 
> > or the current
> > > build?  Is this a known issue that has been resolved?  I 
> > have been unable to
> > > find any information in the archives on this issue.
> > 
> > Don't forget to close the connection in your code: 
> conn.close(). This 
> > will not actually close the connection, but give it back to 
> the pool.
> > 
> > At least, that's the way it was way back in September.
> > 
> > 
> > 
> > -- 
> > tomK
> > 
> > 
> > This is a test of the emergency signature system.  Were 
> this an actual
> > signature, you would see amusing mottos, disclaimers, a zillion net
> > addresses, or edifying philisophical statements.  This is 
> only a test.
> > 
> > 
> > 
> -
> > Please check that your question  has not already been 
> answered in the
> > FAQ before posting. 
>  >
> > 
> > To 
> unsubscribe, e-mail: 
> <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> > 
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Pass a xsl variable as a esql tag parameter?

2002-06-18 Thread Stephen Ng

(Correct me if I'm wrong...) An xsp file is not an xslt stylesheet; xsl
commands won't work in an xsp.

Steve

> -Original Message-
> From: System Administrator [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, June 18, 2002 12:33 PM
> To: [EMAIL PROTECTED]
> Subject: Pass a xsl variable as a esql tag parameter?
> 
> 
> Hi all,
> 
> I'm having problems passing an xsl variable as a parameter to esql.
> 
> 1 - I am defining a column name as a variable called col1.
> 2 - I want to use this variable as the column value in the 
>  tag.
> 
> This is not working, producing a language exception
> 
> 
> 
>column1
> 
>   
> 
> 
> 
>   
> 
> 
> 
> 
> Is this the right way to do this?
> 
> Any help appreciated.
> 
> Regards
> Graeme Colman. 
> 
> 
> 
>  
>
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: XSP with inner classes.

2002-06-18 Thread Stephen Ng

I haven't seen any examples; but I have been able to use inner classes
within XSP's with no problem.

> -Original Message-
> From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 5:08 AM
> To: '[EMAIL PROTECTED]'
> Subject: XSP with inner classes.
>
>
> Are there examples of XSP with inner classes in Cocoon samples?
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




Database component help

2002-06-14 Thread Stephen Ng

I need to be able to connect to multiple databases on the fly in my app.
I'm using esql.  I'd also like to use connection pooling.

I tried creating a new Component on the fly (DynamicJdbcDataSource which
extends JdbcDataSource), thinking that I could grab the
ComponentManager, and add my new component to it, so that my esql sheet
could continue to use , and have it use my component.

The problem is that I guess I can't add a new component to an already
initialized component manager.  So, I guess you are supposed to create a
fixed number of (pooled) components at startup time, and that number
can't change while the app is running?

If that is the case, I guess what I need to do is use
org.apache.avalon.excalibur.datasource.JdbcConnectionPool, and hack esql
to use that instead of the component selector?

Thanks,

Steve

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: JDBC for SQL Server 2000

2002-06-13 Thread Stephen Ng

Sure, it's:

http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?ur
l=/MSDN-FILES/027/001/779/msdncompositedoc.xml

I'm never sure if these msdn url's work, so the algorithm for finding the
page is to go to http://msdn.microsoft.com, downloads, then search for "JDBC
SQL Server".

--Steve

> -Original Message-
> From: telmo sa [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 13, 2002 6:53 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: JDBC for SQL Server 2000
>
>
> Can you give the url?
>
> Thank you.
>
> Telmo
>
>
> >From: "Stephen Ng" <[EMAIL PROTECTED]>
> >Reply-To: <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: RE: JDBC for SQL Server 2000
> >Date: Thu, 13 Jun 2002 06:45:28 -0400
> >
> >JDBC for SQL Server 7Why not the free one from Microsoft?
> >   -Original Message-
> >   From: Parrott Geoff [mailto:[EMAIL PROTECTED]]
> >   Sent: Thursday, June 13, 2002 6:30 AM
> >   To: Cocoon-Users (E-mail)
> >   Subject: JDBC for SQL Server 2000
> >
> >
> >   Hi
> >
> >   Slight amendment I now find out it is Server 2000 not 7
> as previous
> >message
> >
> >   Can anyone recommend a good Free or Cheap JDBC driver for
> MSSQL  2000
> >type 4 if possible
> >
> >   Currently developing with Cocoon 2 Tomcat 4.0.3 LE & jdk 1.4.0
> >
> >   I am migrating code developed on MySQL to run on MSSQL I
> have found many
> >issues
> >
> >   I am experiencing problems with whitespace written to the
> database is
> >this
> >a JDBC issue
> >
> >   Regards
> >
> >   Geoff
> >
>
>
>
>
> _
> Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: JDBC for SQL Server 2000

2002-06-13 Thread Stephen Ng
Title: JDBC for SQL Server 7



Why 
not the free one from Microsoft?

  -Original Message-From: Parrott Geoff 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, June 13, 
  2002 6:30 AMTo: Cocoon-Users (E-mail)Subject: JDBC for 
  SQL Server 2000
  Hi  
  Slight amendment 
  I now find out it is Server 2000 not 7 as previous 
  message 
  Can anyone recommend a good Free or Cheap JDBC driver for 
  MSSQL  2000  type 4 if possible 
  Currently developing with Cocoon 2 Tomcat 4.0.3 LE & jdk 
  1.4.0 
  I am migrating code developed on MySQL to run on MSSQL I have 
  found many issues 
  I am experiencing problems with whitespace written to the 
  database is this a JDBC issue 
  Regards 
  Geoff 


RE: "Please Wait" Message

2002-06-11 Thread Stephen Ng

Another (microsoft-only) possibility would be to use an XMLHTTP object to
grab status dynamically and display progress.

> -Original Message-
> From: J.Pietschmann [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 12:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: "Please Wait" Message
>
>
> David Vos wrote:
> > It would be nice to send the user
> > some kind of "Please Wait" message, and then send them the
> file when it is
> > ready.
>
> Some more ideas:
>   http://marc.theaimsgroup.com/?l=fop-user&m=102356941400834&w=2
>
> J.Pietschmann
>
>
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: 2.0.3 ?

2002-06-11 Thread Stephen Ng

i have the same question

Since 2.1 is branched, is 2.0.3 in bugfix mode now...?

> -Original Message-
> From: Ricardo Trindade [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, June 11, 2002 6:58 AM
> To: [EMAIL PROTECTED]
> Subject: 2.0.3 ?
> 
> 
> is there a date for the 2.0.3 release ?
> 
> I know this is always a strange question in OSS...
> 
> thanks a lot
> Ricardo
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: toString in CacheValidity

2002-06-06 Thread Stephen Ng

Hmmm, which explains why I had to put a string serialized version of my
validity check into toString or else my xsp caching stopped working as soon
as I stuck it into an aggregation

This does seem redundant; makes sense that it's going away.

Thanks,

Steve

> -Original Message-
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:41 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: toString in CacheValidity
>
>
> > From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> >
> > Can someone point to some document that explains what toString() is
> used
> > for in the CacheValidity object?  I've found explanations for (and
> > pretty sure I understand) generateKey, isValid, etc, but
> haven't found
> > any explanation for the (important) toString() function.
>
> Last modification "date" for the Sitemap sources
> (src="cocoon:/") is
> created as hash of the pipeline validity converted to String.
>
> This won't be needed in the Cocoon 2.1 because source's interface was
> changed to include getValidity() method.
>
> Vadim
>
> >
> > Thanks,
> >
> > Steve
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




toString in CacheValidity

2002-06-06 Thread Stephen Ng

Can someone point to some document that explains what toString() is used
for in the CacheValidity object?  I've found explanations for (and
pretty sure I understand) generateKey, isValid, etc, but haven't found
any explanation for the (important) toString() function.

Thanks,

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: XHTML

2002-06-04 Thread Stephen Ng

You can just use the XML serializer.

> -Original Message-
> From: Istvan Beszteri [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, June 04, 2002 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: XHTML
> 
> 
> Hi All,
> 
> What is the easiest way to generate XHTML output?
> I have an XSL which transforms XML to XHTML, but it seems the 
> serializer 
> converts it to simple HTML. (I have some  tags and it 
> convert them to 
> )
> 
> Br,
>   Istvan
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 


To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: How can I use a different XSLT Processor?

2002-05-24 Thread Stephen Ng

Although I was never totally successful with this, AFAIK this is what
you need to do for Saxon in Cocoon 2.0.2:

1. Replace xalan-2.3.1 with saxon.jar.
2. Use v1.9 of xsp.xsl
(http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoo
n/components/language/markup/xsp/java/xsp.xsl)
3. Start the servlet-engine with the additional switch
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFac
toryImpl

Be sure to clear out your cache directory before restarting.

Steve

> -Original Message-
> From: Graaf, Edgar de (fin) [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, May 24, 2002 7:37 AM
> To: Cocoon-Users (E-mail)
> Subject: How can I use a different XSLT Processor?
> 
> 
> Hi,
> 
> Can someone tell me how I would use a different XSLT 
> Processor? For example Saxon
> 
> Regards
> 
> Edgar
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 


To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: I18n Performance

2002-05-21 Thread Stephen Ng

I think it would be swell if any transformer was cacheable, and the
cache was controllable from the sitemap; e.g. SQLTransformer.

> -Original Message-
> From: Peter Royal [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 21, 2002 3:15 PM
> To: [EMAIL PROTECTED]
> Subject: Re: I18n Performance
> 
> 
> On Tuesday 21 May 2002 02:44 pm, Torsten Curdt wrote:
> > Ages ago I proposed some changes on having a more abstract resource 
> > bundle (we'd like serve our from db) which has a last 
> modified stamp 
> > so we can easily implement cacheable... but time you know ;-)
> 
> I have 1/2 that :) 
> We have bundles on disk that are our system translations and 
> bundles in the 
> DB that are user-defined that layer on top of the system 
> ones. I haven't 
> implemented last-modified support yet since I don't need it, 
> but it wouldn't 
> be bad.
> 
> > This would be a major(!) improvement... we haven't yet (and 
> wouldn't) 
> > use the i18n transformer under the current circumstances.
> 
> I'll try and package it up sooner :)
> -pete
> 
> -- 
> peter royal -> [EMAIL PROTECTED]
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 


To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)

2002-05-21 Thread Stephen Ng

Artur,

What version of Cocoon are you using?  2.0.2 or something closer to
2.0.3?

Steve

> -Original Message-
> From: Artur Bialecki [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 21, 2002 11:13 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)
> 
> 
> Also, saxon 6.5.2 and 7 has a bug with identity transform 
> because of bug in DOMDriver. So, if you're using XPath (eg, 
> xinclude transformer) things might not look the way you 
> expect them to.
> 
> I told the author of Saxon how to fix this bug, but haven't 
> heard anything back.
> 
> Artur...
> 
> > -Original Message-
> > From: Frank Ridderbusch 
> [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 21, 2002 10:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)
> > 
> > 
> > Well, here is what I've done. However I've found, that no 
> all samples 
> > work any more with Saxon, in particular SQL transformer and 
> XMLforms.
> > 
> > - Also replaced xalan.jar with saxon.jar
> > 
> > - Starting the servlet-engine with the additional switch
> > 
> >   
> > 
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserF
> > actoryImpl
> > 
> >   in TOMCAT_OPTS/CATALINA_OPTS.
> > 
> >   According to the saxon documentation, saxon uses/can use 
> two XML parsers,
> >   one for the input and the other for the XSL stylesheet, 
> so that the input
> >   can be validated and the XSL stylesheet not.
> > 
> >   In my setup, before setting the above option, I alway 
> received exceptions
> >   coming from the in saxon included parser Alfred 
> (something in the realm
> >   of resolving). Now, Xerces is used for both input and stylesheet.
> > 
> > - in cocoon/WEB-INF/classes/CatalogManager.properties I've set
> > 
> >   catalogs=/usr/lib/xemacs/packages/etc/psgml/CATALOG
> > 
> >   This is a catalog file, which is included with the PSGML 
> (a XEmacs SGML/HTML
> >   editing package) and the PSGML packages also contains a 
> bunch of DTDs and
> >   entity files, which saves you collecting them from the Net.
> > 
> > This setup works for me, even for my own custom DTDs. Although I'm 
> > using 2.1-dev this should also work for 2.0.2. At least it 
> works with 
> > 2.0.3-dev for me.
> > 
> > Perhaps, this helps.
> > 
> > On Tue, 21 May 2002 10:32:04 -0400
> > "Stephen Ng" <[EMAIL PROTECTED]> wrote:
> > 
> > > I've been struggling with getting Saxon 6.5.2 and Cocoon 2.0.2 
> > > working together for a couple of days now
> > > 
> > > Here's what I did and what I found:
> > > 
> > > 1. I replaced xalan-2.3.1 with saxon.jar.
> > > 2. I grabbed v1.9 of xsp.xsl 
> > > 
> (http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/c
> > > ocoo
> > > n/components/language/markup/xsp/java/xsp.xsl)
> > > 
> > > I started getting (intermittent) null pointer errors trying to 
> > > resolve static files.  I had a sub-sitemap with:
> > > 
> > > "context://dir/data.xml"
> > > 
> > > Changing these to just
> > > 
> > > "dir/data.xml"
> > > 
> > > made a set of them go away.  (Does this make any sense?)
> > > 
> > > But I continue to get NPE's in the resolver code.  They came from
> > > 
> > > XSLTProcessorImpl::resolve() {
> > > //...
> > > 
> > >   File parent = new File(base.substring(5));
> > >   File parent2 = new File(parent.getParentFile(), href);
> > >   xslSource = resolver.resolve(parent2.toURL().toExternalForm());
> > > 
> > > }
> > > 
> > > Turns out "resolver" was null.
> > > 
> > > I looked in CVS, and the whole mechanism for getting a resolver 
> > > appears to have been rewritten.  So, as a hack, I just check for 
> > > null in setSourceResolver.  (I have *no idea* what I'm 
> doing here, 
> > > folks).
> > > 
> > > public void setSourceResolver(SourceResolver resolver) {
> > >   if (resolver!=null)
> > >  this.resolver = resolver;
> > > }
> > > 
> > > Now I have no more NPE's, but I still have a resolver problem 
> > > somewhere--one of my pipelines is failing because it 
> can't locate a 
> > > stylesheet.  Still have to fig

RE: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)

2002-05-21 Thread Stephen Ng

Frank Ridderbusch [[EMAIL PROTECTED]] writes:
> - Starting the servlet-engine with the additional switch 
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SA
> XParserFactoryImpl

Oops, I forgot to mention that I had seen this on the mailing list and
am doing this already.

I'm not doing the catalog thing, but this a nice-to-have, not a
must-have, right?

> Well, here is what I've done. However I've found, that no all 
> samples work any more with Saxon, in particular SQL 
> transformer and XMLforms. 

This is worrisome!  I'm using SQL Transformer.

Maybe I should wait for 2.0.3.  Or get enough courage to try it.

How much of a speedup did you get with Saxon?

--Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: XSLTC

2002-05-21 Thread Stephen Ng

XSLTC is not ready for general use yet--there are bugs which are being
worked out.  There are a few messages on this topic floating around the
cocoon-dev list.

Steve

> -Original Message-
> From: Graaf, Edgar de (fin) [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 21, 2002 10:04 AM
> To: Cocoon-Users (E-mail)
> Subject: XSLTC
> 
> 
> Hello,
> 
> Can anyone tell me how I would use XSLTC in cocoon. Is there 
> a transformer that can call a translet or something like 
> that? Maybe it is handy to have the option to compile all XSL 
> on usage (to translet). Or is that already the case?
> 
> Regards,
> 
> Edgar
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 


To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)

2002-05-21 Thread Stephen Ng

Another observation I forgot:  it appears to be very very important to
clear out your cache (Tomcat/work) directory after switching jars and
before restarting, otherwise you get null pointer exceptions.  Probably
obvious to a lot of people but it wasn't to me

> -Original Message-
> From: Stephen Ng [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 21, 2002 10:32 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)
> 
> 
> I've been struggling with getting Saxon 6.5.2 and Cocoon 
> 2.0.2 working together for a couple of days now
> 
> Here's what I did and what I found:
> 
> 1. I replaced xalan-2.3.1 with saxon.jar.
> 2. I grabbed v1.9 of xsp.xsl 
> (http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/ap
> ache/cocoo
> n/components/language/markup/xsp/java/xsp.xsl)
> 
> I started getting (intermittent) null pointer errors trying 
> to resolve static files.  I had a sub-sitemap with:
> 
> "context://dir/data.xml"
> 
> Changing these to just
> 
> "dir/data.xml"
> 
> made a set of them go away.  (Does this make any sense?)
> 
> But I continue to get NPE's in the resolver code.  They came from
> 
> XSLTProcessorImpl::resolve() {
> //...
> 
>   File parent = new File(base.substring(5));
>   File parent2 = new File(parent.getParentFile(), href);
>   xslSource = resolver.resolve(parent2.toURL().toExternalForm());
> 
> }
> 
> Turns out "resolver" was null.
> 
> I looked in CVS, and the whole mechanism for getting a 
> resolver appears to have been rewritten.  So, as a hack, I 
> just check for null in setSourceResolver.  (I have *no idea* 
> what I'm doing here, folks).
> 
> public void setSourceResolver(SourceResolver resolver) {
>   if (resolver!=null)
>  this.resolver = resolver;
> }
> 
> Now I have no more NPE's, but I still have a resolver problem 
> somewhere--one of my pipelines is failing because it can't 
> locate a stylesheet.  Still have to figure that one out.
> 
> But, now my app is running enough that I can time it.  Well,  
> I'm getting it's between 10% to 25% faster, which is not 
> nearly as much as I'd hoped.  (A quick test showed Saxon 7 to 
> be a tad slower, but it might just be noise.)  (My app is 
> currently taking about 2.2 seconds to serve a page (1.7 Ghz 
> P4, 512MB Ram, WinXP), of which I figure no more than .5 sec 
> is due to database access, and the rest I think is Cocoon 
> time.  I'm really gunning for sub-second response for a demo 
> next week.)
> 
> Should I upgrade to CVS 2.0.3 and try again?  (I know this is 
> a stupid question, but how close is it to being soup?)  Or 
> keep plugging at 2.0.2?  Or wait for 2.0.3 to ship?  Best 
> thing would be XSLTC!  
> 
> Steve
> 
> 
> 
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 
<http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Problems with Saxon (6.5.2) and resolver (Cocoon 2.0.2)

2002-05-21 Thread Stephen Ng

I've been struggling with getting Saxon 6.5.2 and Cocoon 2.0.2 working
together for a couple of days now

Here's what I did and what I found:

1. I replaced xalan-2.3.1 with saxon.jar.
2. I grabbed v1.9 of xsp.xsl
(http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoo
n/components/language/markup/xsp/java/xsp.xsl)

I started getting (intermittent) null pointer errors trying to resolve
static files.  I had a sub-sitemap with:

"context://dir/data.xml"

Changing these to just

"dir/data.xml"

made a set of them go away.  (Does this make any sense?)

But I continue to get NPE's in the resolver code.  They came from

XSLTProcessorImpl::resolve() {
//...

  File parent = new File(base.substring(5));
  File parent2 = new File(parent.getParentFile(), href);
  xslSource = resolver.resolve(parent2.toURL().toExternalForm());

}

Turns out "resolver" was null.

I looked in CVS, and the whole mechanism for getting a resolver appears
to have been rewritten.  So, as a hack, I just check for null in
setSourceResolver.  (I have *no idea* what I'm doing here, folks).

public void setSourceResolver(SourceResolver resolver) {
  if (resolver!=null)
 this.resolver = resolver;
}

Now I have no more NPE's, but I still have a resolver problem
somewhere--one of my pipelines is failing because it can't locate a
stylesheet.  Still have to figure that one out.

But, now my app is running enough that I can time it.  Well,  I'm
getting it's between 10% to 25% faster, which is not nearly as much as
I'd hoped.  (A quick test showed Saxon 7 to be a tad slower, but it
might just be noise.)  (My app is currently taking about 2.2 seconds to
serve a page (1.7 Ghz P4, 512MB Ram, WinXP), of which I figure no more
than .5 sec is due to database access, and the rest I think is Cocoon
time.  I'm really gunning for sub-second response for a demo next week.)

Should I upgrade to CVS 2.0.3 and try again?  (I know this is a stupid
question, but how close is it to being soup?)  Or keep plugging at
2.0.2?  Or wait for 2.0.3 to ship?  Best thing would be XSLTC!  

Steve




-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: XIndice and Caching

2002-05-17 Thread Stephen Ng

Never mind, I a couple of emails from cocoon-dev which answer my
questions:

> - How much faster (roughly) is xsltc?  
"People keep discussing benchmarks for various XSLT interpreters, trying
to make the best choice. I think we've already agreed that nothing beats
XSLTC .. that is when it works."
> - A google search on XSLTC and Cocoon turns up a 4/9/02 
> message from Stefano that he's "closer" to getting xsltc 
> working with cocoon.  Does xsltc work with cocoon?
> - Any tips on getting them to work together?

There are still outstanding bugs which keep xsltc from working with
cocoon--but they are being worked on

--Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: XIndice and Caching

2002-05-17 Thread Stephen Ng

I'm working on speeding up my cocoon app also.  

A few (probably dumb) questions

- How much faster (roughly) is xsltc?  
- A google search on XSLTC and Cocoon turns up a 4/9/02 message from
Stefano that he's "closer" to getting xsltc working with cocoon.  Does
xsltc work with cocoon?
- Any tips on getting them to work together?

--Stephen Ng

> -Original Message-
> From: Ivelin Ivanov [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, May 17, 2002 9:27 AM
> To: [EMAIL PROTECTED]
> Subject: Re: XIndice and Caching
> 
> 
> 
> - Original Message - 
> From: "Vadim Gritsenko" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 16, 2002 7:20 AM
> Subject: RE: XIndice and Caching
> 
> 
> > > From: Alex McLintock [mailto:[EMAIL PROTECTED]]
> > > 
> > > Hi folks,
> > > 
> > > I have a XIndice backed Cocoon website which I want to 
> speed up. It 
> > > is
> > far
> > > too slow.
> > > 
> > > One thing I need to reduce is the number of XSLT for loops, but 
> > > that's
> > for
> > > another time.
> 
> Did you try XSLTC?
> 
> 
> > > 
> > > The second thing I am looking at is trying to use Cocoon/Avalon
> > caching and
> > > I am not sure I understand it.
> > > 
> > > Do I cache the database results, or the xml/html which we get from
> > them
> > > after being processed by XSLT ?
> > 
> > Xindice does not support any metadata (yet), including last 
> > modification date. This makes any caching of the xindice 
> results not 
> > possible.
> > 
> > You can participate in xindice dev 
> ([EMAIL PROTECTED]) list 
> > to implement this feature sooner than later.
> > 
> > Vadim
> > 
> > 
> > > My XML database changes very infrequently - can I tell the cache 
> > > that
> > it
> > > has been updated and thus all cached things should be dropped?
> > > 
> > > Feel free to point me at the docs if I've missed them.
> > > 
> > > Alex
> > > 
> > > 
> > > 
> > > Openweb Analysts Ltd, London: Software For Complex Websites 
> > > http://www.OWAL.co.uk/ Free Consultancy for London Companies 
> > > thinking of Open Source
> > Software.
> > 
> > 
> > 
> -
> > Please check that your question has not already been 
> answered in the 
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > 
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> > 
> 
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 
<http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>



-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: .htc how to

2002-05-14 Thread Stephen Ng

You must serve the .htc from Cocoon--do you have a rule for it in your
sitemap?

> -Original Message-
> From: Cocoon User [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 13, 2002 8:07 PM
> To: [EMAIL PROTECTED]
> Subject: .htc how to
>
>
>
> i have a behavor (microsoft .htc)
>  attached in a stylesheet
> i aply this style into a  element in a .xml page
> when i transofrm this .xml using xsl in IE6 i recieve re corect result
>
> but through cocoon i see everything except the result i'm waiting from
> .htc
>
>
> any idea ?
>
> thanks
>
>
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: How does one control caching when using xsl:include?

2002-05-12 Thread Stephen Ng

What I did as a workaround was build a small Ant script to "touch" the
master file when any of the included files changed.  I ran ant manually
between editing my files and testing my app.

--Steve

> -Original Message-
> From: Steven Punte [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, May 11, 2002 7:29 PM
> To: [EMAIL PROTECTED]
> Subject: How does one control caching when using xsl:include?
>
>
> Dear Cocoon User Group:
>
>   I've began separating my XSL stylesheet
>   into multiple files (i.e. due to size)
>   using the xsl:include tag.
>
>   But now I loose the automatic caching/
>   detection and behavior of Cocoon on
>   any of the sub-stylesheet files.
>
>   Is there a way (i.e. configuration) to gain
>   this back?  I'm willing to pay the CPU
>   penalty especially in development mode?
>
>   Thanks in advance.
>
> Steve Punte
> [EMAIL PROTECTED]
>
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: caching proposals: SQLTransformer and Request

2002-05-10 Thread Stephen Ng

RequestGenerator *should* cache.  Give me a good reason why it shouldn't
have caching!

--Steve

> -Original Message-
> From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 10, 2002 7:23 PM
> To: 'Vadim Gritsenko'; [EMAIL PROTECTED]
> Subject: RE: caching proposals: SQLTransformer and Request
>
>
> > May be you should consider different design, which is suited
> > better for
> > the problem? XSP pages with ESQL provide easy ability to program any
> > caching behavior.
> >
>
> What?!?  You just convinced me to go from XSP/ESQL to
> SQLTransformer!  The
> problem with ESQL is the Java recompilation, which is
> excessive when only
> the sql part is changing.
>
> Anyway, another way to solve my problem would be to simulate
> RequestGenerator using an XSP (have an xsp create the same
> format output as
> RequestGenerator).
>
> But this is really no different at all from rewriting
> RequestGenerator so it
> supports caching--the caching issues are exactly the same.
>
> So I think this means I should put caching into RequestGenerator.
>
> (As no-one has either protested or applauded, maybe not that
> many people are
> using RequestGenerator?)
>
> --Steve
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: caching proposals: SQLTransformer and Request

2002-05-10 Thread Stephen Ng

> May be you should consider different design, which is suited
> better for
> the problem? XSP pages with ESQL provide easy ability to program any
> caching behavior.
>

What?!?  You just convinced me to go from XSP/ESQL to SQLTransformer!  The
problem with ESQL is the Java recompilation, which is excessive when only
the sql part is changing.

Anyway, another way to solve my problem would be to simulate
RequestGenerator using an XSP (have an xsp create the same format output as
RequestGenerator).

But this is really no different at all from rewriting RequestGenerator so it
supports caching--the caching issues are exactly the same.

So I think this means I should put caching into RequestGenerator.

(As no-one has either protested or applauded, maybe not that many people are
using RequestGenerator?)

--Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




caching proposals: SQLTransformer and Request

2002-05-10 Thread Stephen Ng

A couple of things I'd like to do with Cocoon caching; let me know if this
is crazy.

1. Add caching to the request generator.  Many of my pipelines are
transformations based upon the request, and since requestGenerator currently
does not support caching, it means those transformations are always re-done
(and often there is some sql at the end of the pipe which is really slow).
I'd like to hash (or MD5?) the request string and use that as the cache key
so that if I get the same one the pipeline knows it can skip over
everything.

2. Add caching to the SqlTransformer.  I know this sounds weird, but hear me
out.  Our database is modified infrequently, so usually returns the same
data.  There is a datestamp in a special table which indicates when the last
time the database was updated.  The SQL Transformer would remember the time
of the last query.  I would have a new parameter to the sql transformer to
indicate when the data is dirty.


  


LastUpdateTime looks like:

20021005144321 (Or whatever the xml date format is, I forget).

SQLGenerator would resolve cocoon:/lastUpdateTime.xml.

I would then have a pipeline for lastUpdateTime.xml which would build it by
querying my special table (but if you wanted, you could use some other
mechanism to build it).

SQLGenerator would compare the two dates and re-run the sql if it needed to.

How does this sound?

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Dynamic sql in xsp

2002-05-10 Thread Stephen Ng

Vadim,

>> And so I plug in:
>> 
>> > src="FileWithCIncludedXspRightNow.xsp">
>>   > value="cocoon:/generatedSQL.sql"/>
>> 
>>
>> But all I get on the console is:
>> 
>>  param is: cocoon:/generatedSQL.sql
>
> Yes sure, what you put there is what you get.
> 
> And no, (answering your next email), this won't be substituted, never.

Oops.  I guess I misunderstood the messages!

I will move my code over the SQL Transformer.

Thank you again for all your help and steering me towards the right path.

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Dynamic sql in xsp

2002-05-09 Thread Stephen Ng

> Maybe the SQL-Transformer can help you.
> 
> Reinhard

No doubt I should move to this eventually (I was just getting to like
esql!)--as I understand it this would clearly eliminate the java
compilation step since there is no xsp involved.  Nevertheless I think
short term I should be able to get a nice speed-up by peeling the sql
off the cocoon parameter.

I see people on the mailing list doing stuff like this:

 
   
 

And expecting, I think, to have cocoon:/generatedSql.sql replaced by the
pipeline results.  But I only get the literal
"cocoon:/generatedSQL.sql".

This should work, shouldn't it?

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Dynamic sql in xsp

2002-05-09 Thread Stephen Ng

Vadim,

> 
> Here I mean do not use include to include your XSLT generated 
> SQL, but access cocoon programmatically and get this SQL into 
> String. Then, you will have static XSP source.

Sounds good to me but I have absolutely no idea how to do this :-(.  Can
you give me a pointer?

> Have you considered SQL transformer? It works best here.

Hmmm, no, will check this out.

> > Could I take the dynamic xslt-generated sql string and 
> shove it into a 
> > cocoon parameter, and then read the parameter inside my xslt?
> 
> Do you mean "inside my XSP"? Yes, you can do something like this.
> 

Sorry, you are right; that's what I meant.  I am having some trouble
though which is probably related to your first suggestion.

I found this code in the archives:

 String myParam = "";

 try{
   myParam = parameters.getParameter("GeneratedSQL");
   System.out.println("param is: " + myParam);
 }
 catch (Exception e)
 {}

And so I plug in:


  


But all I get on the console is:

param is: cocoon:/generatedSQL.sql

Thanks for your help,

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Dynamic sql in xsp

2002-05-09 Thread Stephen Ng

> 
> Why not generate SQL string *in* this XSP? That's would give 
> the best performance.
> 
> Or, other way is to obtain this SQL string into String 
> programmatically, without using include.
> 

Okay I understand the suggestion but it doesn't work that well in my
case.  The reason is that the sql string is generated as a series of
xslt transforms:


  
  



And I like this approach, especially since I much prefer writing in XSLT
than in Java.  But in theory I could redo my (not trivial) xslt scripts
in Java.

Could I take the dynamic xslt-generated sql string and shove it into a
cocoon parameter, and then read the parameter inside my xslt?  Other
place I thought about about sticking the sql was inside the session or
(shudder) inside a file.

Steve

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Dynamic sql in xsp

2002-05-09 Thread Stephen Ng

I need some advice.

I have an xsp which is using esql.  The query in the esql is dynamically
generated (based upon the request string).  I use cinclude to inject the
dynamic sql into the esql element.  Something like this:


  

  

So, I have an xsp that is dynamic.

This work just peachy.

Problem is, it's slow--the java compiler has to rebuild the xsp every
time the sql changes, which is costing me 1/2 a second (and is pretty
pointless, it's only the string that is changing).

How can I get the xsp to load the string in some other way, so I that I
can use a static xsp, and not have the compilation overhead?

Thanks,

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: How to pass parameters to stylesheet from sitemap

2002-04-23 Thread Stephen Ng

Sorry; you are right, it works fine, this looks like a bug in my
stylesheet somewhere.

Thanks,

Steve

> -Original Message-
> From: Konstantin Piroumian [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 23, 2002 12:04 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: How to pass parameters to stylesheet from sitemap
> 
> 
> > Is there a way to pass in a parameter to a stylesheet run 
> by the xslt 
> > transformer?
> >
> > I want to do something like this:
> >
> > 
> > 
> > 
> >
> > But it doesn't seem to work.
> 
> It works here. Did declare  in 
> your stylesheet?
> 
> Konstantin
> 
> >
> > Thanks,
> >
> > Steve
> >
> >
> > 
> -
> > Please check that your question has not already been 
> answered in the 
> > FAQ before posting. 
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
> 

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




xslt transformer caching

2002-04-23 Thread Stephen Ng

The xslt transformer doesn't know if a file that is being imported has
changed and needs to be reloaded instead of using the cached version.

I.e.:



If foo.xslt 's bar.xslt, Cocoon doesn't check to see if
bar.xslt has changed. Is there a way in the sitemap to explicitly
specify that foo.xslt depends on bar.xslt?

Stephen Ng

Lumigent

 

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Xslt transformer caching

2002-04-23 Thread Stephen Ng

The xslt transformer doesn't know if a file that is being imported has
changed and needs to be reloaded instead of using the cached version.

I.e.:



If foo.xslt 's bar.xslt, Cocoon doesn't check to see if
bar.xslt has changed. Is there a way in the sitemap to explicitly
specify that foo.xslt depends on bar.xslt?

For example:


  


Thanks,

Steve

Stephen Ng

Lumigent

 


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




How to pass parameters to stylesheet from sitemap

2002-04-23 Thread Stephen Ng

Is there a way to pass in a parameter to a stylesheet run by the xslt
transformer?

I want to do something like this:





But it doesn't seem to work.

Thanks,

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Small annoyance with xslt transformer caching

2002-04-22 Thread Stephen Ng

The xslt transformer doesn't know if a file that is being imported has
changed and needs to be reloaded instead of using the cached version.

I.e.:



If foo.xslt 's bar.xslt, Cocoon doesn't check to see if
bar.xslt has changed.  Is there a way in the sitemap to explicitly
specify that foo.xslt depends on bar.xslt?

Stephen Ng
Lumigent


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Serving static XML files a la Cocoon-1

2002-04-22 Thread Stephen Ng

Must admit I am not familiar with Cocoon-1, but you can setup wildcards
in the sitemap so that all documents in a particular location are
automatically displayed; you don't have to explicitly give the filename.

Users *can* add their own files, with arbitrary names, without involving
an administrator.

--Steve


> -Original Message-
> From: Peter Flynn [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, April 22, 2002 9:31 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Serving static XML files a la Cocoon-1
> 
> 
> Vadim writes:
> 
> > > contain the  Processing Instruction.
> > 
> > This instruction is not working anymore.
> 
> OK.
> 
> > > The "documentation" does not mention this method of 
> working. Has it 
> > > been scrapped?
> > 
> > Yes.
> 
> Would be nice if there was a doc for Cocoon-1 users which 
> explained this.
> 
> > Read concept docs and sitemap docs on Cocoon site. Sitemap 
> is the only 
> > way to tell Cocoon what it needs to do. You should spend 
> some time to 
> > get it - once you get it, chances are, you will love it.
> 
> You must be kidding. Every time a user wants to put a new doc 
> on the server, the administrator has to manually add an entry 
> to the sitemap? This is the height of lunacy, and a surefire 
> way to kill Cocoon stone dead.
> 
> Requirement: an XML/XSL[T] server that simply recognises .xml, 
> performs the relevant conversion, and ships out the result. 
> Cocoon-1 did this fine: why break a perfectly good piece of software?
> 
> ///Peter
> 
> 
> 
> 
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 


To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Cocoon cache hash clash

2002-04-20 Thread Stephen Ng

So CacheValidity objects should always take an extra Object parameter,
which contains the string or whatever key is being hashed.  The isValid
function would then not just do its usual validity checking, it should
also check the equality of those objects.

To be explicit, we could rewrite TimeStampCacheValidity to be hash clash
safe as follows:

private Object realKey;  // the other key is "just" a hash which
fits in a long.

public TimeStampCacheValidity(long timeStamp, Object realKey) {
this.timeStamp = timeStamp;
  this.realKey = realKey;
}

public boolean isValid(CacheValidity validity) {
if (validity instanceof TimeStampCacheValidity) {
return this.timeStamp ==
((TimeStampCacheValidity)validity).getTimeStamp() &&
this.realKey.equals(validity.realKey);
}
return false;
}

Would this (or something like it since I haven't even compiled this)
work?  

Or is something better planned for a future (imminent) release of
Cocoon? (I didn't have any luck searching for the bug or TODO that you
mentioned)

Many thanks,

Steve

> -Original Message-
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, April 19, 2002 2:05 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: Cocoon cache hash clash
> 
> 
> > From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> > 
> > I'm confused by coocoon caching--what if I have use HashUtil in my 
> > generateKey, and two different pages/request happen to generate the
> same
> > hash key?  Won't cocoon erroneously return the same page from the
> cache?
> 
> Only if validity matches. But it usually does not - result is 
> that these two pages won't be cached at all. Luckily, this 
> (almost) does not happen.
> 
> There is a bug and a TODO item on this theme.
> 
> Vadim
> 
> 
> > Steve Ng
> > Lumigent
> 
> 

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Cocoon cache hash clash

2002-04-19 Thread Stephen Ng


>If you have time, you can try to analyze the whole caching picture,
including aggregation, sources, and C/X includes.

Ha! No, not yet.  Maybe after I've used Cocoon a little longer I'll be
more comfortable tackling it.  Meanwhile I will put in my little object
check in my code so I don't worry about the clash problem for now.

Steve

> -Original Message-
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, April 19, 2002 2:47 PM
> To: Stephen Ng
> Cc: [EMAIL PROTECTED]
> Subject: RE: Cocoon cache hash clash
> 
> 
> > From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> > 
> > So CacheValidity objects should always take an extra Object 
> parameter, 
> > which contains the string or whatever key is being hashed.  The
> isValid
> > function would then not just do its usual validity 
> checking, it should 
> > also check the equality of those objects.
> > 
> > To be explicit, we could rewrite TimeStampCacheValidity to be hash
> clash
> > safe as follows:
> > 
> > private Object realKey;  // the other key is "just" a 
> hash which 
> > fits in a long.
> > 
> > public TimeStampCacheValidity(long timeStamp, Object realKey) {
> > this.timeStamp = timeStamp;
> >   this.realKey = realKey;
> > }
> > 
> > public boolean isValid(CacheValidity validity) {
> > if (validity instanceof TimeStampCacheValidity) {
> > return this.timeStamp ==
> > ((TimeStampCacheValidity)validity).getTimeStamp() &&
> > this.realKey.equals(validity.realKey);
> > }
> > return false;
> > }
> > 
> > Would this (or something like it since I haven't even 
> compiled this) 
> > work?
> 
> This has good chances to work; also I'm not (yet?) sure I 
> like this solution.
> 
> 
> > Or is something better planned for a future (imminent) release of 
> > Cocoon? (I didn't have any luck searching for the bug or 
> TODO that you
> > mentioned)
> 
> It is planned to be fixed, also it is not discussed how it 
> will be fixed. Bug related to the caching is:
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4641
> 
> And TODO item (related to caching) is:
> 
> http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/todo.xml?rev=1.2
> 8&content-
> type=text/vnd.viewcvs-markup:
> 
> 
>Fix lastModificationDate() method misuse. Instead of 
> modificationDate,
>sometimes generated hash value is being returned, and instead of
>comaring dates on before/after, they are compared on equality.
>See 
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=997807082
> 22079&
> w=2
>and 
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=998142169
> 23705&
> w=2
>for more information on this issue.
>   
> 
> If you have time, you can try to analyze the whole caching 
> picture, including aggregation, sources, and C/X includes.
> 
> Vadim
> 
>  
> > Many thanks,
> > 
> > Steve
> > 
> > > -Original Message-
> > > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, April 19, 2002 2:05 PM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: RE: Cocoon cache hash clash
> > >
> > >
> > > > From: Stephen Ng [mailto:[EMAIL PROTECTED]]
> > > >
> > > > I'm confused by coocoon caching--what if I have use 
> HashUtil in my 
> > > > generateKey, and two different pages/request happen to generate
> the
> > > same
> > > > hash key?  Won't cocoon erroneously return the same 
> page from the
> > > cache?
> > >
> > > Only if validity matches. But it usually does not - 
> result is that 
> > > these two pages won't be cached at all. Luckily, this
> > > (almost) does not happen.
> > >
> > > There is a bug and a TODO item on this theme.
> > >
> > > Vadim
> > >
> > >
> > > > Steve Ng
> > > > Lumigent
> 
> 
> -
> Please check that your question has not already been answered 
> in the FAQ before posting. 
<http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Cocoon cache hash clash

2002-04-19 Thread Stephen Ng

I'm confused by coocoon caching--what if I have use HashUtil in my
generateKey, and two different pages/request happen to generate the same
hash key?  Won't cocoon erroneously return the same page from the cache?

Steve Ng
Lumigent


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Extra namespace declarations in XML from XSP

2002-04-05 Thread Stephen Ng

[Sorry if this is being posted twice; my email is misbehaving so I'm not
sure if this went out.]

I'm running into a small nuisance with Cocoon 2.0.2 (I'm running WinXP).

After my XSP has been processed, I find the resulting xml file still has
all the namespaces from the xsp.

This is bumming me out because I have unit tests on my xml output, and I
have to update them to include these extraneous namespaces every time I
refactor my xsp's.  (Plus it's a little wasteful to pass these namespace
declarations around when they aren't needed).

To see an example of this, go to docs/samples/xsp/hello.xsp.

Change the first line to read:

http://apache.org/xsp";
xmlns:foo="http://www.bigcompany.com"; exclude-result-prefixes="foo">

Then navigate to:

http://localhost:8080/cocoon/xsp-plain/hello?cocoon-view=content

You should get:


http://apache.org/xsp"; xmlns:foo="http://lumigent.com";>
  Hello
  
This is my first Cocoon page!
With the help of XSP and Apache Cocoon 2.0.2
  


Notice how you get an xmlns:foo declaration here.

Exclude-result-prefixes doesn't seem to make a difference.  In my case,
I have quite a few namespaces, such as cinclude, esql, etc.

I went into esql.xsl and threw in exclude-result-prefixes="esql" on
xsl:stylesheet, but it didn't make a difference.

So now I'm stumped.

Anyone out there know how to fix this?

Thanks,

Stephen Ng
Lumigent


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Extra namespace declarations in XML from XSP

2002-04-05 Thread Stephen Ng

I'm running into a small nuisance with Cocoon 2.0.2 (I'm running WinXP).

After my XSP has been processed, I find the resulting xml file still has
all the namespaces from the xsp.

This is bumming me out because I have unit tests on my xml output, and I
have to update them to include these extraneous namespaces every time I
refactor my xsp's.  (Plus it's a little wasteful to pass these namespace
declarations around when they aren't needed).

To see an example of this, go to docs/samples/xsp/hello.xsp.

Change the first line to read:

http://apache.org/xsp";
xmlns:foo="http://www.bigcompany.com"; exclude-result-prefixes="foo">

Then navigate to:

http://localhost:8080/cocoon/xsp-plain/hello?cocoon-view=content

You should get:

 
http://apache.org/xsp"; xmlns:foo="http://lumigent.com";>
  Hello 
  
This is my first Cocoon page! 
With the help of XSP and Apache Cocoon 2.0.2 
  


Notice how you get an xmlns:foo declaration here.

Exclude-result-prefixes doesn't seem to make a difference.  In my case,
I have quite a few namespaces, such as cinclude, esql, etc. 

I went into esql.xsl and threw in exclude-result-prefixes="esql" on
xsl:stylesheet, but it didn't make a difference.

So now I'm stumped.

Anyone out there know how to fix this?

Thanks,

Stephen Ng
Lumigent


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Latest Xalan

2002-03-15 Thread Stephen Ng

I think I've found a bug in the xalan (v. 2.2?) that comes with 2.01.
Has anyone had any luck using Cocoon 2.0.1 with the latest Xalan
(2.3.1)?

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Validate xhtml

2002-02-28 Thread Stephen Ng

Right now Cocoon takes (possibly malformed?) html, and runs it through a
program to tidy up the html before shooting it to the browser.

I would like to do something like the opposite of that.  I believe my
code already generates valid xhtml, and don't need to take the extra
processing time to have it cleaned up.  Presumably I can do this by
using the xml serializer, but changing the output type to html?

But I would like to go further than this and have a transformer which
checks my xhtml against a dtd, and give me an error if it is
nonconformant.  (I'd use the transformer only during development).

Has anyone ever tried this?

Steve


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Newbies: New Tutorial about Request Parameters

2002-02-26 Thread Stephen Ng
Title: Message



Andreas,
 
This is great stuff!!! Thank 
you!
 
Stephen Ng
Lumigent

  
  -Original Message-From: Andreas Hartmann 
  [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 1:05 
  PMTo: [EMAIL PROTECTED]Subject: Newbies: New 
  Tutorial about Request Parameters
  Hi Cocoon users,
   
  I created a little tutorial on using request 
  parameters.
  You can find it at
  http://www.cocooncenter.de/cc/documents/resources/request-params/index.html .
   
  If anyone wants to publish other uses 
  for request parameters
  - or anything else - just contact me at [EMAIL PROTECTED] .
   
  Greetings,
  Andreas