Re: How to repeat block lines multiple times in cheetah

Santosh Hulisandra Srikanta <[email protected]> Thu, 1 Aug 2013 00:43:14 +0530
Newsgroups gmane.comp.python.cheetah
Message-ID <CA+03-8-cAvvjc0dRvDfsbjuK_7qW+EFBtDG6tDSAKQ=Vv77DXw@mail.gmail.com>
--===============4117086669091156971==
Content-Type: multipart/alternative; boundary=047d7bdc9a026670f104e2d384e5

--047d7bdc9a026670f104e2d384e5
Content-Type: text/plain; charset=ISO-8859-1

Here is my requirement.

i have below template

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type ="text/xsl"  href = "test.xsl"?>
  <Page>
  <Object>
<Type>$edit</Type>
<Name>$guest</Name>
<id>$viewpwd</id>
    </Object>
  </Page>


from the above template i need to generate one more template like


<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type ="text/xsl"  href = "test.xsl"?>
  <Page>
  <Object>
<Type>$edit</Type>
<Name>$guest</Name>
<id>$viewpwd</id>
    </Object>
   <Object>
<Type>$edit</Type>
<Name>$guest</Name>
<id>$viewpwd</id>
    </Object>
   <Object>
<Type>$edit</Type>
<Name>$guest</Name>
<id>$viewpwd</id>
    </Object>
  </Page>


Please let me know how to achivee this


On Wed, Jul 31, 2013 at 11:02 PM, Santosh Hulisandra Srikanta <
[email protected]> wrote:

> Hello,
> I am generating xml file in which i need to repeat block multiple times
> plz do let me know how to achieve this.
>
> regards
> santosj
>

--047d7bdc9a026670f104e2d384e5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br></div><div><br></div>Here is my requirement.<div>=
<br></div><div>i have below template</div><div><br></div><div><div>&lt;?xml=
 version=3D&quot;1.0&quot; encoding=3D&quot;utf-8&quot;?&gt;</div><div>&lt;=
?xml-stylesheet type =3D&quot;text/xsl&quot; =A0href =3D &quot;test.xsl&quo=
t;?&gt;</div>
<div>=A0 &lt;Page&gt;</div><div>=A0 <span class=3D"" style=3D"white-space:p=
re">	</span>&lt;Object&gt;</div><div><span class=3D"" style=3D"white-space:=
pre">		</span>&lt;Type&gt;$edit&lt;/Type&gt;</div><div><span class=3D"" sty=
le=3D"white-space:pre">		</span>&lt;Name&gt;$guest&lt;/Name&gt;</div>
<div><span class=3D"" style=3D"white-space:pre">		</span>&lt;id&gt;$viewpwd=
&lt;/id&gt; =A0 =A0</div><div>=A0 =A0 &lt;/Object&gt;<span class=3D"" style=
=3D"white-space:pre">	</span></div><div>=A0 &lt;/Page&gt;</div></div><div c=
lass=3D"gmail_extra">
<br></div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">f=
rom the above template i need to generate one more template like</div><div =
class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"><br></div><div c=
lass=3D"gmail_extra">
<div class=3D"gmail_extra">&lt;?xml version=3D&quot;1.0&quot; encoding=3D&q=
uot;utf-8&quot;?&gt;</div><div class=3D"gmail_extra">&lt;?xml-stylesheet ty=
pe =3D&quot;text/xsl&quot; =A0href =3D &quot;test.xsl&quot;?&gt;</div><div =
class=3D"gmail_extra">
=A0 &lt;Page&gt;</div><div class=3D"gmail_extra">=A0 <span class=3D"" style=
=3D"white-space:pre">	</span>&lt;Object&gt;</div><div class=3D"gmail_extra"=
><span class=3D"" style=3D"white-space:pre">		</span>&lt;Type&gt;$edit&lt;/=
Type&gt;</div>
<div class=3D"gmail_extra"><span class=3D"" style=3D"white-space:pre">		</s=
pan>&lt;Name&gt;$guest&lt;/Name&gt;</div><div class=3D"gmail_extra"><span c=
lass=3D"" style=3D"white-space:pre">		</span>&lt;id&gt;$viewpwd&lt;/id&gt; =
=A0 =A0</div>
<div class=3D"gmail_extra">=A0 =A0 &lt;/Object&gt;<span class=3D"" style=3D=
"white-space:pre">	</span></div><div class=3D"gmail_extra"><span class=3D""=
 style=3D"white-space:pre"><div class=3D"gmail_extra" style=3D"white-space:=
normal">=A0=A0<span class=3D"" style=3D"white-space:pre">	</span>&lt;Object=
&gt;</div>
<div class=3D"gmail_extra" style=3D"white-space:normal"><span class=3D"" st=
yle=3D"white-space:pre">		</span>&lt;Type&gt;$edit&lt;/Type&gt;</div><div c=
lass=3D"gmail_extra" style=3D"white-space:normal"><span class=3D"" style=3D=
"white-space:pre">		</span>&lt;Name&gt;$guest&lt;/Name&gt;</div>
<div class=3D"gmail_extra" style=3D"white-space:normal"><span class=3D"" st=
yle=3D"white-space:pre">		</span>&lt;id&gt;$viewpwd&lt;/id&gt; =A0 =A0</div=
><div class=3D"gmail_extra" style=3D"white-space:normal">=A0 =A0 &lt;/Objec=
t&gt;<span class=3D"" style=3D"white-space:pre">	</span></div>
<div class=3D"gmail_extra" style=3D"white-space:normal"><span class=3D"" st=
yle=3D"white-space:pre"><div class=3D"gmail_extra" style=3D"white-space:nor=
mal">=A0=A0<span class=3D"" style=3D"white-space:pre">	</span>&lt;Object&gt=
;</div><div class=3D"gmail_extra" style=3D"white-space:normal">
<span class=3D"" style=3D"white-space:pre">		</span>&lt;Type&gt;$edit&lt;/T=
ype&gt;</div><div class=3D"gmail_extra" style=3D"white-space:normal"><span =
class=3D"" style=3D"white-space:pre">		</span>&lt;Name&gt;$guest&lt;/Name&g=
t;</div>
<div class=3D"gmail_extra" style=3D"white-space:normal"><span class=3D"" st=
yle=3D"white-space:pre">		</span>&lt;id&gt;$viewpwd&lt;/id&gt; =A0 =A0</div=
><div class=3D"gmail_extra" style=3D"white-space:normal">=A0 =A0 &lt;/Objec=
t&gt;<span class=3D"" style=3D"white-space:pre">	</span></div>
</span></div></span></div><div class=3D"gmail_extra">=A0 &lt;/Page&gt;</div=
><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"><br></div>=
Please let me know how to achivee this</div><div class=3D"gmail_extra"><br>=
</div>
<div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Jul 31, 2=
013 at 11:02 PM, Santosh Hulisandra Srikanta <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div>Hello,</div><div>I =
am generating xml file in which i need to repeat block multiple times plz d=
o let me know how to achieve this.</div>
<div><br></div><div>regards</div><div>santosj</div></div>

</div>
</blockquote></div><br><br>
</div></div>

--047d7bdc9a026670f104e2d384e5--


--===============4117086669091156971==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
--===============4117086669091156971==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

--===============4117086669091156971==--