473,226 Members | 1,319 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

<pre> tag question

Hi All,

I'm building an XSL document that puts two types of

information in a table dimension: preformatted data and data

extracted from my XML document (see below)

<table>
<tr>
<td>
<xsl:choose>
<xsl:when test="@amount=0"><pre> X </pre></xsl:when>
<xsl:otherwise><pre> Y </pre></xsl:otherwise>
</xsl:choose>
<u><xsl:value-of select="@title" /></u>
</td>
</tr>
</table>

The output is in a <td>, but it shows up on two separate

lines. Is there any way to make it show up as one continious line?

When I remove the <pre> tags, everything is on one line, but I lose

the formatting. Is this a 'by design' feature of the <pre> tag?

--------------------------
| X |
|The Red Badge of Courage|
--------------------------

Thanks,

James

Jul 20 '05 #1
2 3672


Porthos wrote:

The output is in a <td>, but it shows up on two separate

lines. Is there any way to make it show up as one continious line?

When I remove the <pre> tags, everything is on one line, but I lose

the formatting. Is this a 'by design' feature of the <pre> tag?


That is a HTML question, see the HTML 4.01 specification
<http://www.w3.org/TR/html4/struct/text.html#h-9.3.4>
HTML 4.01 knows block-level and inline elements
<http://www.w3.org/TR/html4/struct/global.html#h-7.5.3>
and <pre> is a block-level element.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
For those who are interested, following Martin's advice I read up on
block vs inline elements and came up with the CSS below:

<!-- CSS Stylesheet -->
<style type="text/css">
pre { display: inline; }
</style>
<!-- End CSS Stylesheet -->

Thanks Martin

-James

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Wladimir Borsov | last post by:
Assume I want to publish a longer article on a web page. One of the paragraphs I want to display with an indent. Read: All text lines of this paragraph should be displayed with (let's say 8) blanks...
3
by: Matt Adams | last post by:
I want to move the following <PRE> defintion to a css file: <TABLE><TR><TD><PRE>sample text</PRE></TD> <TD> not predefined font</TD></TR></TABLE> should be <TABLE><TR><TD class=aaa>sample...
1
by: Alan Illeman | last post by:
This is one of several macros I wish to display: <PRE CLASS="special macro> ;; ;; Reverse argument list ;; reverse_args MACRO arglist:req local txt, arg txt textequ <> % FOR arg, <arglist>
3
by: Michael Shell | last post by:
Greetings, Consider the XHTML document attached at the end of this post. When viewed under Firefox 1.0.5 on Linux, highlighting and pasting (into a text editor) the <pre> tag listing will...
7
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
9
by: Eric Lindsay | last post by:
I can't figure how to best display little snippets of shell script using <pre>. I just got around to organising to bulk validate some of my web pages, and one of the problems occurs with Bash...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.