You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sanne de Roever <sa...@newfoundland.nl> on 2002/09/06 19:23:32 UTC
svg xsp java
Hi,
I've managed to make some svg's with xsp: which is pretty cool!
But now I want to go further and try to make tables in svg.
Basically what I would need is such a snippet:
<xsp:logic>
for (int count=0;count < 25;count++){
</xsp:logic>
<g id="XMLID_1_">
<rect x="0" y="<xsp:expr> count*13+40 </xsp:expr>" width="500" height="12"
fill="yellow"/>
</g>
<xsp:logic>
};
This would setup several rows, and if this would work I could also get the cells in the rows.
But the snippet above is not correct: cocoon says that y has a faulty value. Which I can understand.
What I can't understand is how to get around this. I've tried fooling cocoon with a &lt;rect tag, but then the &lt; instead of an < tag appears in my SVG.
Has anybody any experience with this?
Regards,
Sanne
++++++++++++ http://www.newfoundland.nl ++++++++++++
Sanne de Roever
Newfoundland Interactive Technology
Jacob van Lennepkade 187
1054 ZN Amsterdam
Telefoon: +31 (0)20 4 700 623 / +31 (0)6 24 510 562
Fax: +31 (0)20 4 700 624
Email: sanne@newfoundland.nl
+++++++++++++++++++++++++++++++++++++++++++++++
Re: svg xsp java
Posted by Boris Althaus <bo...@petra-productions.de>.
I think you should build the attribute using <xsp:attribute name="y"><xsp:expr>...
----- Original Message -----
From: Sanne de Roever
To: cocoon-users@xml.apache.org
Sent: Friday, September 06, 2002 7:23 PM
Subject: svg xsp java
Hi,
I've managed to make some svg's with xsp: which is pretty cool!
But now I want to go further and try to make tables in svg.
Basically what I would need is such a snippet:
<xsp:logic>
for (int count=0;count < 25;count++){
</xsp:logic>
<g id="XMLID_1_">
<rect x="0" y="<xsp:expr> count*13+40 </xsp:expr>" width="500" height="12"
fill="yellow"/>
</g>
<xsp:logic>
};
This would setup several rows, and if this would work I could also get the cells in the rows.
But the snippet above is not correct: cocoon says that y has a faulty value. Which I can understand.
What I can't understand is how to get around this. I've tried fooling cocoon with a &lt;rect tag, but then the &lt; instead of an < tag appears in my SVG.
Has anybody any experience with this?
Regards,
Sanne
++++++++++++ http://www.newfoundland.nl ++++++++++++
Sanne de Roever
Newfoundland Interactive Technology
Jacob van Lennepkade 187
1054 ZN Amsterdam
Telefoon: +31 (0)20 4 700 623 / +31 (0)6 24 510 562
Fax: +31 (0)20 4 700 624
Email: sanne@newfoundland.nl
+++++++++++++++++++++++++++++++++++++++++++++++
Re: svg xsp java
Posted by Boris Althaus <bo...@petra-productions.de>.
more precisely:
<xsp:logic>
for (int count=0;count < 25;count++){
</xsp:logic>
<g id="XMLID_1_">
<xsp:content>
<rect x="0" width="500" height="12"
fill="yellow"><xsp:attribute name="y"><xsp:expr> count*13+40 </xsp:expr></xsp:attribute></rect>
</xsp:content>
</g>
<xsp:logic>
----- Original Message -----
From: Sanne de Roever
To: cocoon-users@xml.apache.org
Sent: Friday, September 06, 2002 7:23 PM
Subject: svg xsp java
Hi,
I've managed to make some svg's with xsp: which is pretty cool!
But now I want to go further and try to make tables in svg.
Basically what I would need is such a snippet:
<xsp:logic>
for (int count=0;count < 25;count++){
</xsp:logic>
<g id="XMLID_1_">
<rect x="0" y="<xsp:expr> count*13+40 </xsp:expr>" width="500" height="12"
fill="yellow"/>
</g>
<xsp:logic>
};
This would setup several rows, and if this would work I could also get the cells in the rows.
But the snippet above is not correct: cocoon says that y has a faulty value. Which I can understand.
What I can't understand is how to get around this. I've tried fooling cocoon with a &lt;rect tag, but then the &lt; instead of an < tag appears in my SVG.
Has anybody any experience with this?
Regards,
Sanne
++++++++++++ http://www.newfoundland.nl ++++++++++++
Sanne de Roever
Newfoundland Interactive Technology
Jacob van Lennepkade 187
1054 ZN Amsterdam
Telefoon: +31 (0)20 4 700 623 / +31 (0)6 24 510 562
Fax: +31 (0)20 4 700 624
Email: sanne@newfoundland.nl
+++++++++++++++++++++++++++++++++++++++++++++++
Re: svg xsp java -> solved!
Posted by Sanne de Roever <sa...@newfoundland.nl>.
Thanks Boris and Ilya,
I've got this thing working in no time thanks to you two!
I still needed to do some thinking, but then it appeared to me:
<xsp:element name="rect">
<xsp:attribute name="x">0</xsp:attribute>
<xsp:attribute name="y"><xsp:expr> count*13+40
</xsp:expr></xsp:attribute>
<xsp:attribute name="width">500</xsp:attribute>
<xsp:attribute name="height">12</xsp:attribute>
</xsp:element>
And all of this thanks to your response in 30 min!
Jooooocheeeeeeiiiii! (excitement in dutch)
Great to start the weekend having solved this.
Thanks!
Sanne
----- Original Message -----
From: "Ilya A. Kriveshko" <il...@kaon.com>
To: <co...@xml.apache.org>
Sent: Friday, September 06, 2002 7:27 PM
Subject: Re: svg xsp java
> You are trying to use JSP approach to writing XSP document.
> Use the following syntax for dynamic attributes instead:
>
> <xsp:logic>
> for (int count=0;count < 25;count++){
> </xsp:logic>
> <g id="XMLID_1_">
> <rect x="0" width="500" height="12" fill="yellow">
> <xsp:attribute name="y"><xsp:expr> count*13+40
> </xsp:expr></xsp:attribute>
> </rect>
> </g>
> <xsp:logic>
> };
> </xsp:logic>
> --
> Ilya
>
>
> Sanne de Roever wrote:
>
> > Hi,
> >
> > I've managed to make some svg's with xsp: which is pretty cool!
> >
> > But now I want to go further and try to make tables in svg.
> > Basically what I would need is such a snippet:
> >
> > <xsp:logic>
> > for (int count=0;count < 25;count++){
> > </xsp:logic>
> > <g id="XMLID_1_">
> >
> > <rect x="0" y="<xsp:expr> count*13+40 </xsp:expr>" width="500"
> > height="12"
> > fill="yellow"/>
> > </g>
> > <xsp:logic>
> > };
> > This would setup several rows, and if this would work I could also get
> > the cells in the rows.
> > But the snippet above is not correct: cocoon says that y has a faulty
> > value. Which I can understand.
> > What I can't understand is how to get around this. I've tried fooling
> > cocoon with a &lt;rect tag, but then the &lt; instead of an
> > < tag appears in my SVG.
> >
> > Has anybody any experience with this?
> >
> > Regards,
> >
> > Sanne
> > ++++++++++++ http://www.newfoundland.nl ++++++++++++
> >
> > Sanne de Roever
> > Newfoundland Interactive Technology
> > Jacob van Lennepkade 187
> > 1054 ZN Amsterdam
> > Telefoon: +31 (0)20 4 700 623 / +31 (0)6 24 510 562
> > Fax: +31 (0)20 4 700 624
> > Email: sanne@newfoundland.nl <ma...@newfoundland.nl>
> >
> > +++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> ---------------------------------------------------------------------
> 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: <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/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: svg xsp java
Posted by "Ilya A. Kriveshko" <il...@kaon.com>.
You are trying to use JSP approach to writing XSP document.
Use the following syntax for dynamic attributes instead:
<xsp:logic>
for (int count=0;count < 25;count++){
</xsp:logic>
<g id="XMLID_1_">
<rect x="0" width="500" height="12" fill="yellow">
<xsp:attribute name="y"><xsp:expr> count*13+40
</xsp:expr></xsp:attribute>
</rect>
</g>
<xsp:logic>
};
</xsp:logic>
--
Ilya
Sanne de Roever wrote:
> Hi,
>
> I've managed to make some svg's with xsp: which is pretty cool!
>
> But now I want to go further and try to make tables in svg.
> Basically what I would need is such a snippet:
>
> <xsp:logic>
> for (int count=0;count < 25;count++){
> </xsp:logic>
> <g id="XMLID_1_">
>
> <rect x="0" y="<xsp:expr> count*13+40 </xsp:expr>" width="500"
> height="12"
> fill="yellow"/>
> </g>
> <xsp:logic>
> };
> This would setup several rows, and if this would work I could also get
> the cells in the rows.
> But the snippet above is not correct: cocoon says that y has a faulty
> value. Which I can understand.
> What I can't understand is how to get around this. I've tried fooling
> cocoon with a &lt;rect tag, but then the &lt; instead of an
> < tag appears in my SVG.
>
> Has anybody any experience with this?
>
> Regards,
>
> Sanne
> ++++++++++++ http://www.newfoundland.nl ++++++++++++
>
> Sanne de Roever
> Newfoundland Interactive Technology
> Jacob van Lennepkade 187
> 1054 ZN Amsterdam
> Telefoon: +31 (0)20 4 700 623 / +31 (0)6 24 510 562
> Fax: +31 (0)20 4 700 624
> Email: sanne@newfoundland.nl <ma...@newfoundland.nl>
>
> +++++++++++++++++++++++++++++++++++++++++++++++
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>