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:[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:
> >       <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 , [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:
> >  >
> >  >   <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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to