Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Whitespace content... [Thread Next] Re: Whitespace content...To: NULL Date: 12/2/2004 8:45:00 AM Thanks Neil The xhtml content is processed in a xsl:copy-of statement. I've managed to get my line breaks in using the xsl below <xsl:template name="break"> <xsl:param name="text" /> <xsl:choose> <xsl:when test="contains($text, '
')"> <xsl:copy-of select="substring-before($text, '
')"/><br /> <xsl:call-template name="break"> <xsl:with-param name="text" select="substring-after($text,'
')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$text" /> </xsl:otherwise> </xsl:choose> </xsl:template> However because I an reading the inner text I am losing all markup! I need a way of retaining markup and inserting <br />s in place of 
 Wole Neil Smith [MVP Digital Media] wrote: >Wouldn't you usually have a template which specifically processes <td> >elements in the XHTML and does your insertion of <br /> -- so it gets >used only inside <td> elements ? > >Cheers - Neil > >On Wed, 01 Dec 2004 23:24:36 GMT, "Wole Ogunremi" ><wole.ogunremiNO@S...> wrote: > >>I've got xhtml content in a xml document and I'm using xsl to output html. >>I need a way of getting the output throw in breaks where they occur rather >>than one continous piece of text >>I know I could use <PRE> tags but it is awful when you have really long >>paragraphs... >>I tried replacing crlf with <br/> which is OK for text but not so good when >>the content includes html tags! (<table><br/><tr><br/>...) >> >>I've tried using xml:space="preserve", tried <xsl:preserve-space >>elements="elementName"> with no luck. >> >>Could anyone advise on how to go about doing this? >> >>I am using system.xml.xsl.xsltransform. >> >>Many thanks >>Wole >> > > >========== Posted at http://www.exemell.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
