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(_at_)hotmail(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com > 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. >
--~------------------------------------------------------------------ >
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > To
unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ > or e-mail: >
--~-- > > > > Thanks for the tips. > > I will try them. > > > > Roelof > > >
--~------------------------------------------------------------------ >
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > To
unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ > or e-mail: >
--~-- >
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--