Re: [xsl] Required help in XSL transformation

Subject: Re: [xsl] Required help in XSL transformation
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 07 Sep 2006 15:16:38 +0200
Hi Ambika,

As it appears to me, if I counted correctly, this is the fifth version of your question about retaining HTML in tags. Numerous people have asked you to clarify your posts. Some have proposed suggestions. It would help a great deal if you stick to the thread (just hit reply to your own postings), ask a question just once and update it.

Also, good you update with which of the suggestions you have tried (David, among others, gave you some suggestions) and what your findings are? When you reply, add your input/output and the xslt sheet About the latter: I've seen multiple posts of you displaying the input, all different. It is hard to help if we don't have a good guide of what your real input is.

In the previous (or was it pre-previous? ) question you said that it is a PoC, where you ask *if* it can be done in XSLT. Well, read the replies: yes it can. But exactly *how* depends on your real requirements.

As for the last post (the one below): in the XSLT cookbook there are a few neat little examples of how to get delimited text out of XML.

Cheers,
Abel Braaksma
http://abelleba.metacarpus.com


Ambika.Das@xxxxxxxxxxxxxxxxxx wrote:
Hi All,

I want to transform the following XML data into text format. But I want to retain the HTML tags which will be required for further processing.

<?xml version="1.0" encoding="UTF-8" ?>
<elem id="1234" date="14 Aug 2006" time="13:36">

<title>Sample Title</title>
<text>
<p> This is some data </p>
<p> </p>
<p> This is some special characters &lt;AHLN.AS&gt; </p>
<p> A group of students have gone to picnic. </p>
<p> </p>
<PRE> ** This is another special tag
</PRE></text>
</story>


The output is required in delimited format.

The requirement is that the new lines will be replaced by <br> tag and the double quotes will get converted to a special character.

The output required is as follows.

Elem Id, News Details\r\n
1234, detailed data with character replacement\r\n

Any clues how to implement the same?

Thanks & Regards,
Ambika Prasad Das

Current Thread