You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steven Punte <st...@excite.com> on 2001/06/02 22:09:57 UTC

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

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:steve@amansi.com]
> Sent: 22 May 2001 19:25
> To: mhkay@iclway.co.uk
> 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:
> 	<node>
> 		....
> 	</node>
>
>
> SAXON:
> 	<node
> 	  xmlns:xml="http://www.w3.org/XML/1998/namespace"
> 	  xmlns:xsp="http://www.apache.org/1999/XSP/Core" >
>      		....
> 	</node>
>
>
> 	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 , cocoon-users@xml.apache.org 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:stevep193@excite.com]
>  > Sent: Monday, May 21, 2001 9:02 PM
>  > To: cocoon-users@xml.apache.org
>  > Subject: HELP: Too many namespace attributes with Saxon
>  > 
>  > 
>  > When using Saxon, each and every node is specified with 
>  > detailed namespace information.  For example:
>  > 
>  > Xalan:
>  > 
>  >   <page> 
>  >      ....
>  >   </page>
>  > 
>  > 
>  > Saxon:
>  > 
>  >   <page 
>  >     xmlns:xml http://www.w3.org/XML/1998/namespace
>  >     xmlns:xsp http://www.apache.org/1999/XSP/Core >
>  >       ....
>  >   </page>
>  > 
>  > 
>  > 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. <http://xml.apache.org/cocoon/faqs.html>
>  > 
>  > To unsubscribe, e-mail: <co...@xml.apache.org>
>  > For additional commands, e-mail: <co...@xml.apache.org>
>  > 
>  
>  ---------------------------------------------------------------------
>  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: <co...@xml.apache.org>
>  For additional commands, e-mail: <co...@xml.apache.org>
>





_______________________________________________________
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. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


prolem: cocoon1.7. with tomcat3.2.x: .xml not processed

Posted by Frank Baumeier <24...@topmail.de>.
Hello together,

I know that my problem was discussed sseveral times, but I could not find a
solution in former postings!!!

I try to get the following running for a whole week now:

Cocoon 1.7.4/Cocoon1.8/Cocoon1.8.2 in combination with tomcat 3.2.x.
Unfortunaltely all my .xml files are not processed by cocoon at all!
(Output: text/html ...and so on)

Is this only a CLASSPATH-problem???

Everything works fine with tomcat 3.1.1.

--> question: What the hell is the difference between tomcat3.1.1 and
tomcat3.2.x regarding the necessary installation steps?!?

Thanks in advance,
Frank

P.S. I read several available installation guides again and again...


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


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

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

Sylvain Wallez a écrit :
> 
> Steven Punte a écrit :
> >
> > 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
> >
<snip/>
> 
> Saxon is not in cause in this problem (or maybe only for the xmlns:xml
> declaration) and is compliant with the XSLT spec, while Xalan has some
> bugs with the namespace:: axis and the XSP engine "relies" on this bug.
> 
> I patched the XSP engine for Cocoon 2 to avoid all these extraneous
> declarations, and obviously Cocoon 1 users need this patch also. I'll
> try to do it ASAP (I'm really busy these days, so don't expect it before
> tomorrow) and will notify you when it's done.
> 

Done : I updated org/apache/cocoon/processor/xsp/xsp-java.xsl
Namespaces are now generated only once in XSPs compiled whith Saxon.

Cheers
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


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

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

Steven Punte a écrit :
> 
> 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:steve@amansi.com]
> > Sent: 22 May 2001 19:25
> > To: mhkay@iclway.co.uk
> > 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:
> >       <node>
> >               ....
> >       </node>
> >
> >
> > SAXON:
> >       <node
> >         xmlns:xml="http://www.w3.org/XML/1998/namespace"
> >         xmlns:xsp="http://www.apache.org/1999/XSP/Core" >
> >               ....
> >       </node>
> >
> >
> >       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 , cocoon-users@xml.apache.org 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:stevep193@excite.com]
> >  > Sent: Monday, May 21, 2001 9:02 PM
> >  > To: cocoon-users@xml.apache.org
> >  > Subject: HELP: Too many namespace attributes with Saxon
> >  >
> >  >
> >  > When using Saxon, each and every node is specified with
> >  > detailed namespace information.  For example:
> >  >
> >  > Xalan:
> >  >
> >  >   <page>
> >  >      ....
> >  >   </page>
> >  >
> >  >
> >  > Saxon:
> >  >
> >  >   <page
> >  >     xmlns:xml http://www.w3.org/XML/1998/namespace
> >  >     xmlns:xsp http://www.apache.org/1999/XSP/Core >
> >  >       ....
> >  >   </page>
> >  >
> >  >
> >  > 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"
> >  >       );
> >  >

Saxon is not in cause in this problem (or maybe only for the xmlns:xml
declaration) and is compliant with the XSLT spec, while Xalan has some
bugs with the namespace:: axis and the XSP engine "relies" on this bug.

I patched the XSP engine for Cocoon 2 to avoid all these extraneous
declarations, and obviously Cocoon 1 users need this patch also. I'll
try to do it ASAP (I'm really busy these days, so don't expect it before
tomorrow) and will notify you when it's done.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>