|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] making <p>s or <br> in html from a stylesheet
Dear All, I seem to be stuck on something really simple, and I can't find a clear answer in all the thousands of docs related to white space so I appeal to someone's wisdom. I have some xml which has line feed, carriage returns, whatever, on each line, and I want to transform this into html and I want to keep these little buggers or make something that breaks a line in html. So what should i do ?! I have experimented with a find an replace of all the cr's with <p> </p> but then I have some silly problem selecting, ie I cannot select a <MACRO> with and <p> inside them, hmm, maybe its cuz its late on this side of the world. The line terminator can be anything ie 
. or \n or \r\n Here is a sample xml: <?xml version="1.0" encoding="UTF-8"?> <MACRO_SET> <DOCUMENT_HEADER> .*************************************************************************** **** .************************ MACROS ****************************** .* Created on 01.09.2003 16:43:28 .*************************************************************************** **** </DOCUMENT_HEADER> <MACRO> <COMMENT_HEADER>.*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++ .*++++++++++++++++++++++ BEGIN BEGIN_LINE_RULE .*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++ </COMMENT_HEADER> </MACRO> </MACRO_SET> Here is a sample xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <HTML> <xsl:for-each select="MACRO_SET"> <xsl:value-of select="MACRO"/> </xsl:for-each> </HTML> </xsl:template> </xsl:stylesheet> any help would be grand. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








