Subject: RE: [xsl] image placing question From: Roelof Wobben <rwobben@xxxxxxxxxxx> Date: Mon, 19 Dec 2011 14:52:30 +0000 |
I found and thougt this idea would work. I have this xml : <section> <section id="6" handle="sections">Sections</section> <entry id="12"> <title handle="even-voorstellen">Even Voorstellen</title> <tekst><p>FLOAT : img_5874.jpg</p> <p>Naam : Tamara Wobben<br /> Geboorte gewicht : 2000 gram<br /> Geboorte lengte : 44 cm.<br /> Geboortedatum : 1 september 2005 </p> </tekst> </section> And I found this xml : <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="text//p[starts-with(., 'FLOAT : ')]" priority="1"> <img class="float-left" src="{$workspace}/{image}/{substring-after(., 'FLOAT: ')}" /> </xsl:template> <xsl:template match="text//*"> <xsl:element name="{name()}"> <xsl:apply-templates select="* | @* | text()"/> </xsl:element> </xsl:template> <xsl:template match="text//@*"> <xsl:attribute name="{name(.)}"> <xsl:value-of select="."/> </xsl:attribute> </xsl:template> </xsl:stylesheet> But the FLOAT did not convert to the img tag and all the <p> are gone. Any expert who can tell me why this is not working. Roelof ---------------------------------------- > From: rwobben@xxxxxxxxxxx > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Date: Mon, 19 Dec 2011 10:32:37 +0000 > Subject: RE: [xsl] image placing question > > > is er heel snel en we gaan samen naar huis, een voordeel als je in het zelfde gebouw > > > werkt. > > > > > > > Just a simple thought, is there some kind of rule, which you can introduce. If just one > place image before the > > . If more than one, place image after the first > > . > > Otherwise mode can be an option. But than there must be some kind of difference between the input for page 1 and 2, so it is possible to choose the mode for the right desired output. > > > > > So as you can see the pictures don't have a fixed place but all share the same xml. > > >
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] image placing question, Roelof Wobben | Thread | Re: [xsl] image placing question, Martin Honnen |
RE: [xsl] image placing question, Roelof Wobben | Date | Re: [xsl] image placing question, Martin Honnen |
Month |