Subject: RE: [xsl] Problem retaining HTML tags during XSL transformation From: <Lalit.Chanchlani@xxxxxxxxxxxxxxxxxx> Date: Thu, 11 Jan 2007 16:27:23 +0530 |
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.online@xxxxxxxxx] Sent: Thursday, January 11, 2007 4:10 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Problem retaining HTML tags during XSL transformation Ambika.Das@xxxxxxxxxxxxxxxxxx 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 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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem retaining HTML ta, Abel Braaksma | Thread | [xsl] formatting characters..., Cintron, Jose J. |
Re: [xsl] most efficient flat file , Andrew Welch | Date | Re: [xsl] most efficient flat file , David Carlisle |
Month |