Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2012, 02:07 PM
Registered User
 
Join Date: Mar 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down XSLT Escape specific Node

I would like to take the "html" nodes in a document and replace them with escape characters to store the entire note in a table. (any other suggestions).
Source is an Infopath document.


<my:AdditionalIssues>
<my:IssueFailure>
<html xmlns="http://www.w3.org/1999/xhtml" xml:space="preserve"><div>Issue one</div></html>
</my:IssueFailure>

.....

</my:AdditionalIssues>

Would look like

<my:AdditionalIssues>
<my:IssueFailure>
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:space=&quot;preserve&quot;&gt;&lt;div&gt;Issue one&lt;/div&gt;&lt;/html&gt;
</my:IssueFailure>
.....

</my:AdditionalIssues>
 
Old March 23rd, 2012, 02:13 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Well escaping structured markup is usually a loss of information and results in struggles to unescape it back but there are approaches to serialize nodes with pure XSLT, like http://lenzconsulting.com/xml-to-string/. There are also XSLT processor specific extension functions.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying all the nodes except the specific node arunprasadlv XSLT 14 July 22nd, 2009 09:19 AM
XSLT-escape-sequence sunilkswain XSLT 7 March 23rd, 2009 03:03 AM
Not outputting a specific node zach_1988 XSLT 3 December 2nd, 2008 10:49 AM
How to Escape Forward Slash in XPath/ XSLT? tclancy XSLT 4 January 10th, 2006 05:28 PM
xslt issue to translate escape sequence rk2203 XSLT 2 October 13th, 2005 07:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.