cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicola Ken Barozzi" <nicola...@supereva.it>
Subject Re: [Cocoon Devel] Re: [C2] UML Class Diagram for SiteMap
Date Sun, 10 Sep 2000 18:12:41 GMT
----- Original Message ----- 
From: "Giacomo Pati" <pati_giacomo@yahoo.com>
To: <cocoon-dev@xml.apache.org>; "Nicola Ken Barozzi" <nicolaken@supereva.it>
Sent: Thursday, September 07, 2000 10:23 AM
Subject: Re: [Cocoon Devel] Re: [C2] UML Class Diagram for SiteMap


> 
> --- Nicola Ken Barozzi <nicolaken@supereva.it> wrote:
> > ----- Original Message ----- 
> > From: "Giacomo Pati" <pati_giacomo@yahoo.com>
> > > 
> > > --- Nicola Ken Barozzi <nicolaken@supereva.it> wrote:
> > > > 
> > > > ----- Original Message ----- 
> > > > From: "Giacomo Pati" <pati_giacomo@yahoo.com>
> > > > To: <cocoon-dev@xml.apache.org>
> > > > Sent: Thursday, September 07, 2000 8:48 AM
> > > > Subject: Re: [Cocoon Devel] Re: [C2] UML Class Diagram for
> > SiteMap
> > > > 
> > > > > I've written a stylesheet that presents the sitemap as a html
> > page.
> > > > > I'll want to write an admin app (using C2 of course) for the
> > > > sitemap.
> > > > > But have problems with the FileGenerator not passing Namespaces
> > > > > declaration correctly to the transformer. When you insert the
> > > > following
> > > > > into the <map:pipeline> of the sitemap.xmap file
> > > > > 
> > > > >   <map:match pattern="sitemap">
> > > > >    <map:generate src="sitemap.xmap"/>
> > > > >    <map:serialize type="xml"/>
> > > > >   </map:match>
> > > > > 
> > > > > and request it as
> > > > > 
> > > > >   http://localhost:8080/cocoon/sitemap
> > > > > 
> > > > > you'll see that the xmlnx:map.... has been removed. Have no
> > idea
> > > > why?
> > > > > Does someone elso do?
> > > > 
> > > > Hmmm... In my Transformer (class) the namespaces are called
> > correctly
> > > > with
> > > > Xerces 1.2 and with 1.1.3 are called but give an exception at the
> > > > end, so
> > > > I'm not sure it's the FileGenerator, maybe it's the Serializer
> > that
> > > > kicks them off.
> > > 
> > > You're right. I've used the LogTransformer now to see what the
> > > FileGenerator outputs. And the output seems to be ok. But why does
> > the
> > > simple-sitemap2html.xsl not match _any_ template ???
> > Maybe in XalanTransformer this line?
> > 
> >  this.setDocumentHandler(this.processor);
> > 
> > does a DocumentHandler forward namespace events?
> 
> Not as startNamespacePrefix events but as normal attributes. The
> DocumentHandlerAdapter converts those attributes to appropriate SAX2
> calls. Otherwise also XSP would not work which makes heavy use of
> namespaces.

There are still problems with the sitemap+stylesheet conversion as I see.
I tried XT and all is well (posted ina in a _wrong_ thread):
"
> Regarding the sitemap stylesheet having problems with namespaces, well
> il works all well with XT 
>    <map:transformer     name="xt"      src="org.apache.cocoon.transformation.XTTransformer"/>
> instead of Xalan as a Transformer.
"

So I asked myself:"why XT and not Xalan?".
So I put the Logger before and after the transformer but from defunct
 xalan came no meaningful event.
Then I went into the Transformer and tried X combinantions with parameters and
Loggers-notifiers (with x -> infinity ;-) ) ... result: no luck.
So I thought:"Giacomo said that from commandline all is ok...hmmm".
So I downloaded Xalan from my speedy 56k modem al 600 bytes/sec (ok, I know
you don't give a damn about it ;-) ) and tried an example with the sitemap file
and stylesheet: it doesn't work!
Take away namespaces -> it works!
The example is PureSAX.
I also changed it to use compiled stylesheets as they say in the xalan docs but
no, it doesn't work. :-(
What's going on?!? ;-)

I also manadged to get this wonderful stacktrace:

java.lang.ClassCastException: org.apache.xalan.xpath.dtm.DTMProxy
java.lang.ClassCastException: org.apache.xalan.xpath.dtm.DTMProxy
        at org.apache.xalan.xpath.xdom.XercesLiaison.getNamespaceOfNode(XercesLiaison.java:356)
        at org.apache.xalan.xpath.SimpleNodeLocator.nodeTest(SimpleNodeLocator.java:1775)
        at org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java, Compiled
Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java, Compiled
Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java:321)
        at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1385)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:274)
        at org.apache.xalan.xslt.AVTPartXPath.evaluate(AVTPartXPath.java:109)
        at org.apache.xalan.xslt.AVT.evaluate(AVT.java, Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled
Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,
Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled
Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,
Compiled Code)
        at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java, Compiled
Code)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,
Compiled Code)
        at org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement.java:1195)
        at org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplateElement.java:1057)
        at org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.java, Compiled
Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java, Compiled
Code)
        at org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.java:321)
        at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1385)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
        at org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemplateElement.java,
Compiled Code)

        at org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
        at org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElement.java,
Compiled Code)
        at org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
        at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java, Compiled Code)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java, Compiled Code)
        at org.apache.cocoon.transformation.XalanTransformer.setup(XalanTransformer.java:132)

        <snip/>

I attatched my incredibly horrible file used for this stuff.
There's also the modified PureSAX and the files I wanted to transform.
Maybe it's the case of telling the Xalan guys?
Thanks.

nicola_ken



Mime
View raw message