[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Extracting value from node with formatter elements

Subject: Re: Extracting value from node with formatter elements
From: "Vyacheslav Sedov" <vyacheslav.sedov@xxxxxxxxx>
Date: Mon, 14 Apr 2008 17:30:29 +0400
Re:  Extracting value from node with formatter elements
use <xsl:copy-of select="."/>

On Mon, Apr 14, 2008 at 5:22 PM, Amit Hanchinamani
<a.hanchinamani@xxxxxxxxxxx> wrote:
> Hi All,
>
>  I am using XSLT 2.0 and parser Saxon.
>
>  I am transforming some html tags to another tag format. I have span tags
> which contain text value surrounded by formattere like bold, italic and
> underline. The problem is when I try to extract the value of the node, it
> always returns the text value without formatters <b>,<u> & <i>. The
> following is the code:
>
>  <xsl:template match="span" mode="copy">
>        <xsl:variable name="elementText">
> <xsl:value-of select="." />
>        </xsl:variable>
>
>  The input tag looks the following
>  <span style="font-family:Times New Roman;font-size:12.0pt;"><b><u>blah
> blah</u></b></span>
>
>  I want to get the entire node value "<b><u>blah blah</u></b>". But using
> <xsl:value-of select="." /> or <xsl:value-of select="text()"/> or
> <xsl:value-of select="current()" /> returns only "blah blah". I cannot
> figure out how to get the entire value along with the formatting tags.
>  Any help appreciated.
>
>  Regards,
>  Amit
>
>
>  .

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.