xsl-list
[Top] [All Lists]

RE: [xsl] Problem retaining HTML tags during XSL transformation

2007-01-11 03:57:08
Hi Abel,

I require to do the following :

<?xml version="1.0" encoding="UTF-8" ?>
<elem id="11" date="10 Jan 2007" time="16:55">
Non Title
<title>Title Here</title>
<text>
<PRE> (Start of pre tag) 
<p>
Within P
</p>
After P tag
(End of pre tag) </PRE></text>
</elem>

Using XSLT, I require outputting only the <title> node from the XML.
Please help. 

So the output XML should be <title>Title Here</title>.

Please help. 

Regards,
Lalit

-----Original Message-----
From: Abel Braaksma [mailto:abel(_dot_)online(_at_)xs4all(_dot_)nl] 
Sent: Thursday, January 11, 2007 4:10 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Problem retaining HTML tags during XSL transformation

Ambika(_dot_)Das(_at_)iflexsolutions(_dot_)com wrote:
Hi David,

I am trying to retain the HTML tags like <p> and <pre>. At the same
time, I want to add a <br> tag in case of line break and '""' symbol
for
'"'. Finally the whole output should be CSV compliant.

That is precisely what my solution does for you. Have you tried it? It 
works for me (I used Saxon 6.5). If you go for another solution, you 
better choose "text" as output, instead of "html". In addition, if you 
cannot use the node-set function, you'll have to stick to the recursive 
call-template approach for your string replacement, however, the 
xml-to-text technique can remain the same (but you may want to retain 
attributes, too, which I did not implement for you, but you can easily 
add it yourself).

Cheers
-- Abel Braaksma
   http://www.nuntia.nl

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



DISCLAIMER:
This message contains privileged and confidential information and is intended 
only for the individual named.If you are not the intended recipient you should 
not disseminate,distribute,store,print, copy or deliver this message.Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system.E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be 
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain 
viruses.The sender therefore does not accept liability for any errors or 
omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--