W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2002

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>

From: <Wolfgang.Schreurs@ingbank.com>
Date: Wed, 14 Aug 2002 08:30:52 -0400 (EDT)
Message-ID: <116134D21B7CD411BE0F00508B69D57A033CDF11@AMSXCH06>
To: www-xsl-fo@w3.org




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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT