//Keeping XML Tags in XSL

Problem

In your XSL you want to grab an XML document “as is” but the XSL keeps stripping the XML tags and only returning data values to you.

My LiveSite Component was connecting to a XML WebService and in one case I only wanted to retrieve all the XML and return it to my XSL.

I was struggling as the XSL was removing all the tags and leaving just the contents of the tags.

Here is what I did:

Solution

Use XSL Copy – your XSL should look like:


Important

You must set your Page Settings to “XML” in order to see this correctly – you will not be able to Preview correctly in the LiveSite component development branch as you have no control over the page settings here.

By |2009-02-27T05:45:25+00:00February 27th, 2009|XSL|0 Comments

About the Author: