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

Converting pseudo-tags in attribute to real tags

Subject: Converting pseudo-tags in attribute to real tags
From: Thomas Widmann <thomas.widmann@xxxxxxxxxxxxxxxxxxx>
Date: 22 Aug 2007 13:48:45 +0100
 Converting pseudo-tags in attribute to real tags
Hi there,

I'm fairly new to XSLT (but not to XML processing -- I've been using
Perl's XML::Twig for ages).  So far I've been quite happy with it, but
today I've found a problem that I can't find a solution for -- I've
checked O'Reilly's XSLT and XSLT cookbook, and the FAQ.

My problem is that I have an attribute that looks like this:

   <sentence text="this is &lt;b>bold&lt;/b> text"/>

If I do the following:

<xsl:template match="sentence">
	<i>
		<xsl:value-of select="@text"/>
	</i>
</xsl:template>

Then the result obviously is:

   <i>this is &lt;b>bold&lt;/b> text</i>

However, I really want the pseudotags within the attribute to become
real tags:

   <i>this is <b>bold</b> text</i>

How do I do this?

I hope somebody will be able to help!

Thanks a lot,

Thomas
-- 
   Thomas Widmann         thomas.widmann@xxxxxxxxxxxxxxxxxxx
   Lead Developer                 +44 (141) 306 3295
Collins Dictionaries                  Glasgow, UK



**********************************************************
This message is intended only for the use of the individual(s) to which it
is addressed and may contain information that is privileged and confidential.

If you are not the intended recipient, you are hereby notified that
you have received this transmission in error; any review, dissemination,
distribution or copying of this transmission is strictly prohibited.

If you have received this communication in error, please notify us
immediately by reply e-mail and delete this message and all of its 
attachments.
**********************************************************

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.