cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: Saxon "extra stuff" problem, and comment from Michael Kay
Date Tue, 05 Jun 2001 09:51:15 GMT


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


Mime
View raw message