Subject: RE: [xsl] formatting characters... From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Wed, 10 Jan 2007 20:34:09 -0000 |
Simplest solution is to output a <pre> element containing the formatted text - this tells the browser to preserve the formatting. Without it, all sequences of whitespace characters in HTML are considered equivalent to a single space. If you want to do more elaborate formatting, you're going to have to parse the text, look for the whitespace characters, and construct proper HTML markup such as ul/li (and/or CSS styles) to indicate how you want it displayed. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Cintron, Jose J. [mailto:jcintron@xxxxxxxxx] > Sent: 10 January 2007 19:22 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] formatting characters... > > I have an XML doc that in one of its fields can contain a > list of items... for example > > <description> > There is some text here. Followed by a list: > * item 1 > * item n > Now there may be some additional text here. > </description> > > The portion of the XSLT that handles this block is > > <xsl:template name="DETAILS"> > <xsl:param name="FID"/> > <dd> > <b><SPAN STYLE="font-style:italic">Discussion:</SPAN></b> > </dd> > <dd> > <xsl:value-of > select="document('myfile.xml')//XPathStatement[ID=$FID]/DISCUSSION"/> > </dd> > </xsl:template> > > Is there any way to make sure that each of the list items > displays on it's own line and indented? I've tried adding > the hex characters (
 
 	) to my XML doc, but > when the page is rendered in the browser it all renders as one line. > > +------------------------------------------ > | Josi J. Cintrsn > +------------------------------------------
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] formatting characters..., Cintron, Jose J. | Thread | [xsl] document($RssXmlFeed) not con, Web Developer |
Re: [xsl] Single white space in Tex, Abel Braaksma | Date | Re: [xsl] Dynamic numbering of list, xslt . new |
Month |