[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: browsing text elements
Hi, Yesterday I posted an inquiry about attempting to display (IE5) an element of an XML file whose content is a preformatted block of text. I am dealing with survey data and it is important that the text (which is question text) be presented in the same fashion that it was presented to a survey respondent. Here is another example: <var> <text> In general, when it comes to politics, do you ususally think of yourself as a liberal, a conservative, a moderate, or what? </text> </var> Again, my problem is that using PRE in the XSL stylesheet starts the preformatted text at the first character of the text block rather than after the element declaration. The following statement in the XSL stylesheet- <pre><xsl:value-of select="text"/></pre> returns: In general, when it comes to politics, do you usually think of yourself as a liberal, a conservative, a moderate, or what? One suggestion I received was to put the PRE statement in a table and use alignment attributes - this won't work. The other suggestion was to modify (left justify) the text in the source document. This would defeat the purpose of the stylesheet. Ideally, since this text block could appear at any point on the horizontal rule of an XML document (programs/people will format XML trees differently), it would be nice to somehow have a handle on this <xsl:value-of select="text> as left justified (respecting the line breaks) - then I could go from there. Does anyone know if this is possible? Thanks, Jeff Royal ---------------------------------- Survey Research Center University of California, Berkeley jeff@xxxxxxxxxxxxxxxx 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
|