Re: Using substring and gaining a <a href="...">...<a> from wi thin&In-Reply-To=<5.1.0.14.0.20020813130459.00b73320@pop.storm.ca>&Refere nces=<5.1.0.14.0.20020813130459.00b73320@pop.storm.ca>

The input would be: 
<portal_banner>
<spotlight_text ID="texthref">bla bla <a
href="http://www.apple.com">apple</a> bla </spotlight_text>
<spotlight_image>/content/image_bank/feature_images/mngmnt_update_deBaas.gif
</spotlight_image>
<spotlight_image_href><http://www.apple.com></spotlight_image_href>
</portal_banner>
This is the XML file... 
----------------------------------------------------------------------------
---------------------------------------------------------------- 
The desired output from the XSL file would be: 
bla bla apple <http://www.apple.com> bla 
----------------------------------------------------------------------------
---------------------------------------------------------------- 
where there is a limit of 60 chars, but we allready have the limit by using
this code in the XSL file: 
(I think I can keep this the way it is.) 
<xsl:template name="substring_template">
<xsl:variable name="right_text_string" select="spotlight_text"/>
<xsl:value-of select="substring($right_text_string,0, 60)"/>
</xsl:template> 
----------------------------------------------------------------------------
---------------------------------------------------------------- 
How would I get the desired output? Currently it shows the line of text, but
the hyperlink isn't used, it looks like substring() removes the '<a
href="...">...</a>' tags, but keeps the input between the tags. ie, I get
this output: 
bla bla apple bla 
I hope this is better to understand. I don't use the Formatting Object
(xsl:fo)

Received on Wednesday, 14 August 2002 10:16:33 UTC