[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: browsing text elements

Subject: Re: browsing text elements
From: jeff@xxxxxxxxxxxxxxxx (Jeff Royal)
Date: Wed, 7 Apr 99 12:40:14 PDT
jeff royal
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.