Subject: Re: browsing text elements From: jeff@xxxxxxxxxxxxxxxx (Jeff Royal) Date: Wed, 7 Apr 99 12:40:14 PDT |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: browsing text elements, Allan M. Wind | Thread | Interesting thing about IE5, anyone, Craig Hohlbein |
XML/XSL book for IE5 Shipping, Merriam, Rudyard | Date | RE: Creating Hyperlinks using XSL a, Dean Pignatare |
Month |