Place the <xsp:logic>.... </xsp:logic> tags after 
        <svg:svg width="300" height="300" y="0" x="0" viewBox="0 35 200
200"> 
because you need a first root tag before you can use the logic tag!!!

-----Original Message-----
From: beyaNet Consultancy [mailto:[EMAIL PROTECTED]
Sent: 19mm2004 10:02
To: [EMAIL PROTECTED]
Subject: An if statement breaks my SVG!!!!



Hi, 

I have a simple xsp:logic section which performs a simple instantiation. I
then decided to add some conditional code and wham!, my code breaks. What am
I doing wrong here!!!???? 


<xsp:logic> 

        int imageNum = 1; 

        byte[] photo; 

        

        Artist artist = Artist.getArtist(46); 

        

        if (imageNum == 1) 

        { 

              String test = "hello"; 

        } 

        

        <!-- read image into a byte [] --> 

        byte[] photo_1 = artist.getArtistPhoto1(); 

        //byte[] photo_2 = artist.getArtistPhoto2(); 

        

        <!-- base64 encode byte array --> 

        String Photo1 = Base64.encodeBytes(photo_1); 

        //String Photo2 = Base64.encodeBytes(photo_2); 


</xsp:logic> 

        

        <svg:svg width="300" height="300" y="0" x="0" viewBox="0 35 200
200"> 

              <xsp:element name="image"> 

                  <xsp:attribute name="x">0</xsp:attribute> 

                  <xsp:attribute name="y">0</xsp:attribute> 

                  <xsp:attribute name="width">300</xsp:attribute> 

                  <xsp:attribute name="height">300</xsp:attribute> 

                  <xsp:attribute
name="xlink:href">data:image/jpeg;base64,<xsp:expr>Photo1</xsp:expr></xsp:at
tribute> 

                  <xsp:attribute name="id">artist1</xsp:attribute> 

              </xsp:element> 

        </svg:svg> 


many thanks in advance


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

Reply via email to