I haven't followed your this whole thread, but I think
I've had similar problems that turned out to be
related to namespaces.  Are there any namespaces
declared in your XSP that are not declared in your
XSLT (whether they are used in the output or not)?  If
so, try declaring them in the xslt.  I never looked at
the problem carefully enough to determine whether it
was cocoon not handling things properly, or whether it
was just sloppy handling of namespaces on my part, but
that has fixed a similar problem for me in the past.

Geoff Howard


--- Roger Ting <[EMAIL PROTECTED]> wrote:
> Hi thx for your response.
> 
> The funny thing is below
> What works:
> 1. i read the XSP that uses ESQL with serverpages
> generator it will generate 
> the xml file.
> 2. I save the xml file generated using the the XSP.
> 3. Do transformation with Xalan or Saxon (Tried
> both) and the output
> is correct.
> 
> What doesn't works:
> 1. I read the same XSP.
> 2. pipe it into a XSLT transformer.
> 3. Serialize it in SVG or XML.
> 4. 60% of the output is gone.
> 
> 2 processes are the same except for the first i save
> it before i transform 
> and serialize the xml file generated from the XSP
> with ESQL.
> The second process i pipe the output from XSP
> directly into the XSLT
> transformer and it drop most of the output. Another
> user also faces
> the same problem. We are using 2 different
> computers.
> 
> ===============HERE IS MY XSLT
> =============================
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:icr="http://www.cs.mu.oz.au/340/s340gf";
> xmlns:svg="http://www.w3.org/2000/svg";>
> 
> <xsl:output method="xml" indent="yes"/>
> <xsl:template match="icr:report">
> <svg width="300" height="300" >
>       <title>The graphs for the dailyly section </title>
>       <g transform="translate(100, 100)">
>               <xsl:apply-templates select="icr:fall"/>
>       </g>
> </svg>
> </xsl:template>
> 
> <xsl:template match="icr:fall">
>       <g transform=" translate(-20,-80) scale(2,2)">
>                       <text >
>                               <xsl:attribute name="font-size">
>                                       <xsl:value-of select="6" />
>                               </xsl:attribute>
>                               Patient falls record
>                       </text>
>       </g>
> 
>       <g transform="translate(0,100) scale(2,-2)" >
>                       <!--drawing the axes-->
>          <line x1="0" y1="0" x2="140" y2="0"
> style="stroke: black;"/>
>          <line x1="0" y1="0" x2="0" y2="80"
> style="stroke: black;"/>
>       </g>
> 
>      <!--- Doesn't transform from here onwards
> ----------->
>       <xsl:for-each select="icr:monthly">
>               <xsl:call-template name="draw-bar" >
>                       <xsl:with-param name="n" select="@numerator"/>
>                       <xsl:with-param name="d" select="@denominator"/>
>                       <xsl:with-param name="count"
> select="position()"/>
>                       <xsl:with-param name="threshold"
> select="@threshold"/>
>                       <xsl:with-param name="next" 
>
select="following-sibling::icr:monthly/attribute::numerator"/>
>                       <xsl:with-param name="last"
> select="count(icr:monthly)"/>
>               </xsl:call-template>
>               <xsl:call-template name="write-text" >
>                               <xsl:with-param name="count"
> select="position()"/>
>               </xsl:call-template>
>       </xsl:for-each>
> 
> </xsl:template>
> 
> <xsl:template name="draw-bar">
>               <xsl:param name="n"/>
>               <xsl:param name="d"/>
>               <xsl:param name="count"/>
>               <xsl:param name="threshold"/>
>               <xsl:param name="next"/>
>               <xsl:param name="last"/>
> 
> 
>                       <g transform="translate(0,100) scale(2,-2)" >
>                       <!-- these are the bars in order -->
>                       <rect style="fill:none; stroke:black;"
> stroke-width="1">
>                               <xsl:attribute name="y">
>                                       0
>                               </xsl:attribute>
>                               <xsl:attribute name="x">
>                               <xsl:value-of select="$count*5"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="width">
>                                       5
>                               </xsl:attribute>
>                               <xsl:attribute name="height">
>                                       <xsl:value-of select="20*($n div $d)" />
>                               </xsl:attribute>
>                       </rect>
> 
>                       <rect style="fill:red;stroke:red;">
>                               <xsl:attribute name="y">
>                                       <xsl:value-of select="$threshold"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="x">
>                                       <xsl:value-of select="$count*5+1"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="width">
>                                       2
>                               </xsl:attribute>
>                               <xsl:attribute name="height">
>                                       2
>                               </xsl:attribute>
>                       </rect>
> 
>                       <rect style="fill:blue;stroke:blue;">
>                               <xsl:attribute name="y"><xsl:value-of
> select="$n*10"/></xsl:attribute>
>                               <xsl:attribute name="x"><xsl:value-of 
> select="$count*5+1"/></xsl:attribute>
>                               <xsl:attribute name="width">
>                                       2
>                               </xsl:attribute>
>                               <xsl:attribute name="height">
>                                       2
>                               </xsl:attribute>
>                       </rect>
> 
> 
>                       <line style="stroke:red; stroke-width:0.4;">
>                               <xsl:attribute name="y1">
>                                       <xsl:value-of select="$threshold+1"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="x1">
>                                       <xsl:value-of select="(($count)*5)+2"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="y2">
>                                       <xsl:value-of select="$threshold+1"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="x2">
>                                       <xsl:value-of select="(($count)+1*5)+2"/>
>                               </xsl:attribute>
>                       </line>
> 
>                       <xsl:if test="not($count=$last)">
>                       <line style="stroke:blue; stroke-width:0.4;">
>                               <xsl:attribute name="y1"><xsl:value-of 
> select="($n)*10"/></xsl:attribute>
>                               <xsl:attribute name="x1"><xsl:value-of 
> select="($count*5)+2"/></xsl:attribute>
>                               <xsl:attribute name="y2"><xsl:value-of 
> select="($next)*10"/></xsl:attribute>
>                               <xsl:attribute name="x2"><xsl:value-of 
> select="(($count+1)*5)+2"/></xsl:attribute>
>                       </line>
>                       </xsl:if>
>                       </g>
> </xsl:template>
> 
> <xsl:template name="write-text">
>               <xsl:param name="count"/>
>               <g transform="translate(1,100) scale(2,2)">
>                       <text>
>                               <xsl:attribute name="font-size">
>                                       <xsl:value-of select="5 * 2 div 3" />
>                               </xsl:attribute>
>                               <xsl:attribute name="x">
>                                       <xsl:value-of select="$count*5"/>
>                               </xsl:attribute>
>                               <xsl:attribute name="y">6</xsl:attribute>
> 
>                                               <xsl:value-of select="$count"/>
> 
>                       </text>
>                </g>
> </xsl:template>
> </xsl:stylesheet>
> 
>
========================================================================
> 
> 
> 
> I am suspecting there is something wrong with cocoon
> when it come to xsp 
> with esql and do transformation using XSLT. The
> other user solve
> the problem by breaking down the XSLT stylesheet to
> a smaller chunk
> and it works. He also tried everything before using
> the last method.
> 
> 
> 
> 
> 
> 
> 
> >From: Joerg Heinicke <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: Re: Cocoon FAILS in transforming XML
> >Date: Thu, 10 Oct 2002 02:57:32 +0200
> >
> >If your Cocoon is working in general, I can only
> guess that the error is to 
> >search in your stylesheet. Cocoon itself uses XSLT
> more or less heavily 
> >(e.g. for creating sitemap_xmap.java). Can you show
> a bit code of your XSP, 
> >XSL and sitemap? You can post a minimum example,
> where your code gets 
> >already wrong.
> >
> >Regards,
> >
> >Joerg
> >
> >Roger Ting wrote:
> >>
> >>I kind of doubt that it has to do with XSP because
> if i serialize the
> >>output as XML and do the transformation later by
> reading the xml file
> >>generated from the XSP directly, it works fine .
> HOwever, if i generate
> >>the XSP directly, some of the output just missing
> >>
> >>Anyone use XSP with ESQL and use XSLT
> transformation faces the same
> >>problem?
> >>
> >>>From: "Ryan Agler" <[EMAIL PROTECTED]>
> >>>Reply-To: [EMAIL PROTECTED]
> >>>To: <[EMAIL PROTECTED]>
> >>>Subject: RE: Cocoon FAILS in transforming XML
> >>>Date: Wed, 9 Oct 2002 00:20:19 -0400
> >>>
> >>>Best guess is that something is wrong with the
> xsp.  Can you post your
> >>>log file?
> >>>
> >>>-----Original Message-----
> >>>From: Roger Ting [mailto:[EMAIL PROTECTED]]
> >>>Sent: Tuesday, October 08, 2002 11:48 PM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: Re: Cocoon FAILS in transforming XML
> >>>
> >>>I am using the latest binary distribution which
> is the 2.0.3.
> >>>
> >>>I just change the Xalan and Xerces to the latest
> version. This
> >>>doesn't help.
> >>>
> >>>This only happens when i am using xsp with xslt
> to do transformation.
> >>>The xsp are using esql logicsheet. This doesn't
> happen when i am
> >>>using file generator to read xml and transform to
> SVG using XSLT.
> >>>
> >>>Any idea?
> >>>
> >>>Thx
> >
> >
>
>---------------------------------------------------------------------
> >Please check that your question  has not already
> been answered in the
> >FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> >
> >To unsubscribe, e-mail:    
> <[EMAIL PROTECTED]>
> >For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 
> 
> 
> 
>
_________________________________________________________________
> Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
> 
> 
>
---------------------------------------------------------------------
> Please check that your question  has not already
> been answered in the
> FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:    
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to