Saxon "extra stuff" problem, and comment from Michael Kay

2001-06-02 Thread Steven Punte

I send this question to Michael Kay, author of Saxon,
and received the reply below.  He seems to indicated 
that this is configurable, but I'm not sure of how
to adjust cocoon to eliminate this extra information.

Can anyone suggest how to achieve such a "configuration" 
to Saxon?

   Steve Punte

-
>From Michael Kay:

Please send me an example of a stylesheet that exhibits this behavior.

The XML namespace should never be output.

The XSP namespace should be output only when the XSLT rules require, and
these rules are the same as in Xalan. Depending where it comes from, you may
be able to suppress it using exclude-result-prefixes.

Mike Kay

> -Original Message-
> From: Steve Punte [mailto:[EMAIL PROTECTED]]
> Sent: 22 May 2001 19:25
> To: [EMAIL PROTECTED]
> Subject: Can emission of namespace attributes be suppressed on Saxon?
>
>
> Dear Michael:
>
>   Saxon is great.
>
>   I'm using it with the Cocoon framework instead of Xalan
>   because it is much higher performance.
>
>   However, a difference I see is that name space attribute
>   information is attached to all nodes.
>
> XALAN:
>   
>   
>   
>
>
> SAXON:
>xmlns:xml="http://www.w3.org/XML/1998/namespace";
> xmlns:xsp="http://www.apache.org/1999/XSP/Core"; >
>   
>   
>
>
>   While technically more correct, this is causing A LOT of
>   extra information to be inserted into the synthesized
>   java file (i.e. XSP technology), and thus the 64KByte
>   java method function JVM limitation is approached.
>
>   Is there anyway to suppress this behavior?
>
>   Thanks in advance:
>
>   Steve Punte




On Sat, 2 Jun 2001 14:43:44 +0200 , [EMAIL PROTECTED] wrote:

>  Yes ... we also have this problem in our XSP pages - it adds source code
to 
>  generated .java pages to include namespace declaration attributes in
every 
>  element we produce using XSP.
>  
>  Our configuration is:
>  
>  Cocoon 1.8.3, Saxon 6.2.2.
>  
>  Does anybody other have these problems with SAXON as XSLT transformer ?
>  Have anyone found the solution for this problem ?
>  
>  Thanks
>  
>  Peter
>  
>  > -Original Message-
>  > From: Steven Punte [mailto:[EMAIL PROTECTED]]
>  > Sent: Monday, May 21, 2001 9:02 PM
>  > To: [EMAIL PROTECTED]
>  > Subject: HELP: Too many namespace attributes with Saxon
>  > 
>  > 
>  > When using Saxon, each and every node is specified with 
>  > detailed namespace information.  For example:
>  > 
>  > Xalan:
>  > 
>  >
>  >  
>  >   
>  > 
>  > 
>  > Saxon:
>  > 
>  > > xmlns:xml http://www.w3.org/XML/1998/namespace
>  > xmlns:xsp http://www.apache.org/1999/XSP/Core >
>  >   
>  >   
>  > 
>  > 
>  > While this is perhaps "more correct", it quickly
>  > and needlessly pushes me over the 64K byte JVM
>  > limitation.
>  > 
>  > Does anyone know a way of suppressing this behavior?
>  > 
>  > Thanks:
>  > 
>  >Steve Punte
>  > 
>  > 
>  > 
>  > 
>  > FRAGMETN OUTPUT JAVA FILE USING XALAN
>  > 
>  > xspCurrentNode =
>  >   document.createElement("page");
>  > xspParentNode.appendChild(xspCurrentNode);
>  > 
>  > 
>  > SAME FRAGMENT OUTPUT JAVA FILE USING SAXON
>  > 
>  > xspCurrentNode =
>  >   document.createElement("page");
>  > xspParentNode.appendChild(xspCurrentNode);
>  > 
>  >   ((Element) xspCurrentNode).setAttribute(
>  > "xmlns:xml",
>  > "http://www.w3.org/XML/1998/namespace";
>  >   );
>  > 
>  >   ((Element) xspCurrentNode).setAttribute(
>  > "xmlns:xsp",
>  > "http://www.apache.org/1999/XSP/Core";
>  >   );
>  > 
>  > 
>  > 
>  > 
>  > 
>  > ___
>  > Send a cool gift with your E-Card
>  > http://www.bluemountain.com/giftcenter/
>  > 
>  > 
>  > 
>  > -
>  > 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]>
>





___
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/



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

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

Re: [c2] problem with latest cvs

2001-06-02 Thread Bryan Murphy

BINGO!

I've been struggling with this for awhile now myself.  I was using 
Tomcat 3.3dev for a bit, and all the log files are completely different 
in that version, so I wasn't sure where to look.  Anyway, I downgraded 
to 3.2.2 yesterday and spent some real time looking into the problem. 
 If you look in webapps/cocoon/WEB-INF/logs/cocoon.log you'll see an 
Exception complaining about an undefined method for an SVG object.  I 
modified my sitemap.xmap file, commenting out all entries relating to 
svg, restarted Tomcat and cocoon is working again.  I'm not sure what's 
actually causing the problem yet, but at least doing this will let you 
guys toy around with the other Cocoon2 stuff.

Bryan

>Hi,
>
>I get same exception with the newest C2 version.
>
>>org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
>>not available.
>>
>
>I use Jetty 3.0.6 with the latest C2 cvs version (01.06.2001)
>
>The problem is that the sitemap will never compile.
>
>In the log files I get the following error message:
>
>
>12:06:47.942 EVENT  Cocoon2: init
>12:06:48.007 EVENT  DEBUG   17  [cocoon  ] (SocketListener-0): Trying to
>load class: com.ibm.servlet.classloader.Handler
>+
>12:06:48.046 EVENT  WARN54  [cocoon  ] (SocketListener-0): Could not
>force-load class: com.ibm.servlet.classloader.Handl
>er
>+ java.lang.ClassNotFoundException: com.ibm.servlet.classloader.Handler
>+   at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>+   at java.security.AccessController.doPrivileged(Native Method)
>+   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>+   at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>+   at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>+   at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:46)
>+   at
>org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:399)
>+   at
>org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:119)
>+   at
>com.mortbay.HTTP.Handler.Servlet.ServletHolder.handle(ServletHolder.java:427
>)
>+   at
>com.mortbay.HTTP.Handler.Servlet.ServletHandler.handle(ServletHandler.java:4
>30)
>+   at
>com.mortbay.HTTP.Handler.Servlet.ServletHandler.handle(ServletHandler.java:2
>86)
>+   at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:1087)
>+   at com.mortbay.HTTP.HttpServer.service(HttpServer.java:662)
>+   at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:457)
>+   at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:317)
>+   at
>com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:99)
>+   at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:254)
>+   at
>com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:601)
>+   at java.lang.Thread.run(Thread.java:484)
>
>
>
>- Original Message -
>From: "Donald Ball" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, May 31, 2001 8:48 PM
>Subject: [c2] problem with latest cvs
>
>
>>heya. i just installed a fresh cvs copy of c2 on a fresh
>>jakarta-tomcat-4.0b5 installation on fresh server. when i first request
>>the cocoon home page, i get the infamous confusing exception:
>>
>>ERROR   6991[cocoon  ] (HttpProcessor[8080][4]): Problem with servlet
>>org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
>>not available.
>>at
>>org.apache.cocoon.sitemap.Manager.setupProcessing(Manager.java:179)
>>at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:93)
>>at org.apache.cocoon.Cocoon.process(Cocoon.java:293)
>>at
>>org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:471)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>>however, after the sitemap finishes compiling, i can get in just fine.
>>this didn't used to happen. what's up, any idea?
>>




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




pl reply

2001-06-02 Thread Prasanta Nayak



Dear sir,

Installing Cocoon on Apache Tomcat on linux server

 i followed your all instruction after that i am facing this problem
pl rectify my problem
ASAP




http://localhost:8080/cocoon/samples/index.xml

when i execute this
this type of error is coming


type="text/html"



Cocoon Live Show





Copyright © 1999-2000 The Apache XML Project.
All rights reserved.






-


-
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: init() and destroy() in XSP

2001-06-02 Thread Matthew Cordes

You're quite right, 

I was aware of this, but trying to be as clear as possible. 

Thanks for you input
-matt

On Fri, Jun 01, 2001 at 06:09:59PM -0700, Simon Waddington wrote:
> This is kind of late in the conversation... but there's a race condition in
> your code.  The thread that finds initialized zero could get suspended
> before setting it to one.  Its unlikely but could happen.  Then another
> thread will also find it zero and both threads will end up performing
> initialization.  
> 
> Code modifying shared data should be synchronized to achieve "test and set"
> semantics:
> 
> 
> 
>   boolean initialized = false;
>   public synchronized void doInitialization () {
>  if (!initialized) {
> // Do initialization here
> 
> // if init code successful (assuming it can fail)
> initialized = true;
>  }
>   }
> 
> 
> 
> 
>doInitialization ();
> 
>// rest of page
> 
> 
> 
> If you don't like the method call overhead then make the variable an object
> and synchronize the section around the test-and-set operation on it - or one
> some other appropriate object.   In this case syncrhonization may seem like
> a pain in the butt, but without it once in a blue moon your code will fail -
> if initializing twice on those blue moon occasions isn't a big deal then
> throw caution to the wind and leave it out, otherwise I'm afraid you'll need
> it.
> 
> 
> -Original Message-
> From: Matthew Cordes [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 1:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: init() and destroy() in XSP
> 
> 
> There is no init method, i'm just suggesting:
> 
> 
> 
> int initialized = 0;
> 
> 
> 
> 
> if ( initialized == 0 )
> {
> // do init stuff here
> 
> initialized = 1;  // this block will never be reached again.
> }
> 
> 
> 
> 
> Hope this helps. Perhaps someone else has another idea?
> 
> -matt
> 
> 
> - Original Message -
> From: "Frans Thamura" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 01, 2001 1:24 AM
> Subject: Re: init() and destroy() in XSP
> 
> 
> > Matt,
> > I don't understand, I need your help.
> >
> > I create a lot of xsp:page, but never find init()
> > Would you give the simple work sample?
> >
> > Frans
> > - Original Message -
> > From: "Matthew Cordes" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 01, 2001 3:01 PM
> > Subject: Re: init() and destroy() in XSP
> >
> >
> > > There are work-arounds though:
> > >
> > > INIT:
> > > Make a global variable, set it to null, inside your  block
> check
> > > to see if it is null and do init stuff, then set it to something else.
> > >
> > > DESTROY:
> > > wouldn't  overloading void finalize() { ... } work here?
> > >
> > > -matt
> > >
> > >
> > >
> > > - Original Message -
> > > From: "Frans Thamura" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, May 31, 2001 11:38 PM
> > > Subject: Re: init() and destroy() in XSP
> > >
> > >
> > > > Ya, one of cocoon problem is no init and destroy
> > > >
> > > > - Original Message -
> > > > From: "Polley Christopher W" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Friday, May 04, 2001 9:16 PM
> > > > Subject: init() and destroy() in XSP
> > > >
> > > >
> > > > > Hello, all:
> > > > >
> > > > > I have an XSP page in which  I would like to do some setup (open
> JDBC
> > > > > connection, create prepared statements) upon instantiation and
> cleanup
> > > > > (close ps's and connection) upon destruction.
> > > > >
> > > > > In its previous life as a jsp page, it used jspInit() and
> > jspDestroy(),
> > > > and
> > > > > in a servlet it could use init() and destroy().
> > > > >
> > > > > I found XSPPage.init(parameters), which I can override to do the
> > > > > initialization, but I am unclear on the tail end of the xsp life
> > cycle.
> > > > How
> > > > > & when is it destroyed (in Cocoon 1.8.1) ?  How is this type of
> thing
> > > done
> > > > > in XSP?
> > > > >
> > > > > I suppose that in this case, in which I am only doing JDBC stuff, I
> > > could
> > > > > try the sql taglib, but am unclear on how that would be done.  Can
> > > > >  safely be placed ahead of
> >  > > > > type="xsp"?>? What would the resultant xsp-servlet look like?
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Chris
> > > > >
> > > > >
> > > >
> > -
> > > > > 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]>
> > > >
> > > >
> > > > _
> > > > Do You Yahoo!?
> > > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > >
> > > >
> > > > ---

SAXON and namespacing including problem !

2001-06-02 Thread MORÁVEK Peter

Yes ... we also have this problem in our XSP pages - it adds source code to 
generated .java pages to include namespace declaration attributes in every 
element we produce using XSP.

Our configuration is:

Cocoon 1.8.3, Saxon 6.2.2.

Does anybody other have these problems with SAXON as XSLT transformer ?
Have anyone found the solution for this problem ?

Thanks

Peter

> -Original Message-
> From: Steven Punte [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 21, 2001 9:02 PM
> To: [EMAIL PROTECTED]
> Subject: HELP: Too many namespace attributes with Saxon
> 
> 
> When using Saxon, each and every node is specified with 
> detailed namespace information.  For example:
> 
> Xalan:
> 
>
>  
>   
> 
> 
> Saxon:
> 
>xmlns:xml http://www.w3.org/XML/1998/namespace
> xmlns:xsp http://www.apache.org/1999/XSP/Core >
>   
>   
> 
> 
> While this is perhaps "more correct", it quickly
> and needlessly pushes me over the 64K byte JVM
> limitation.
> 
> Does anyone know a way of suppressing this behavior?
> 
> Thanks:
> 
>Steve Punte
> 
> 
> 
> 
> FRAGMETN OUTPUT JAVA FILE USING XALAN
> 
> xspCurrentNode =
>   document.createElement("page");
> xspParentNode.appendChild(xspCurrentNode);
> 
> 
> SAME FRAGMENT OUTPUT JAVA FILE USING SAXON
> 
> xspCurrentNode =
>   document.createElement("page");
> xspParentNode.appendChild(xspCurrentNode);
> 
>   ((Element) xspCurrentNode).setAttribute(
> "xmlns:xml",
> "http://www.w3.org/XML/1998/namespace";
>   );
> 
>   ((Element) xspCurrentNode).setAttribute(
> "xmlns:xsp",
> "http://www.apache.org/1999/XSP/Core";
>   );
> 
> 
> 
> 
> 
> ___
> Send a cool gift with your E-Card
> http://www.bluemountain.com/giftcenter/
> 
> 
> 
> -
> 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]>




[C1] xslt transformer produces mangled text for input in cp1251 encoding

2001-06-02 Thread Dmitri V. Lovtsyus

Hi All,

please help me. I use Cocoon 1.8.2 and xslt transformer produces
mangled text for input in cp1251 encoding. I've attached 3 files -
.xml, .xsl and result file - .htm. I can see normal russian
symbols in browser, but when I open src of any file I see

Привет

symbols instead.

I use 1. Windows 2000 Professional (regional settings - russian)
  2. Apache 1.3 for win32
  3. Cocoon 1.8.2
  4. JDK 1.3
  5. JServ 1.1.2

In Windows 98 I don't have this bug.

Thanks.

-- 
Kind regards, Dmitri

My ICQ: 55295721
E-mail: [EMAIL PROTECTED]
 rasp1.xml
Title: Blank


	
		
	
		Привет
	

	


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