Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > <pre> tag question

Reply
Thread Tools

<pre> tag question

 
 
Porthos
Guest
Posts: n/a
 
      12-28-2004
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>
<xsltherwise><pre> Y </pre></xsltherwise>
</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

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      12-28-2004


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/
 
Reply With Quote
 
 
 
 
Porthos
Guest
Posts: n/a
 
      12-28-2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
To vlan tag or not to tag? budyerr Cisco 1 07-08-2004 03:45 AM
using param or out tag inside sql tag (jsp/jstl/tomcat) shahbaz Java 0 10-27-2003 02:46 AM
struts tag inside a tag kishan bisht Java 1 07-08-2003 11:04 PM
How to embed the <jsp:plugin> tag into a tag handler class...HELP !! jstack Java 1 07-04-2003 06:58 PM



Advertisments