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

XSL transforming XML to HTML

Subject: XSL transforming XML to HTML
From: "Kien Phan" <kphan@xxxxxxxxxxxxx>
Date: Thu, 6 Jul 2000 19:14:09 -0500
kien phan
Hello All,

    This is my first time to write to the group, and I am very much a novice
at this.  My problem is this:

I have written some XSL to transform some XML into HTML.  Listed below is
the XSL code, followed by the HTML, then followed by the desired HTML.  I am
using Apache.org's Xalan processor with XMLSpy 3.0; Can anyone tell me if
there are any built-in XSL functions that will allow me to avoid the <SPAN>
and <FONT> tags from being outputted on the next line after the <DIV> tag.
The reason being is that if they are all on one line, the browsers (IE 5.0
and NN 4.73) display them a little differently.  I currently have
<xsl:output method="html" indent="yes"> as a directive in my XSL file, but I
have also tried transforming w/o this directive, and the HTML output still
puts <SPAN>/<FONT> tags on the next line after the <DIV>.  I guess my
question boils down to whether there is a way to control the output of the
Xalan processor, specifically line returns, white space, and indentation?

XSL:

<div id="gold">
    <xsl:choose>
        <xsl:when test="$contract='yearly'">
            <font>
            <xsl:value-of
select="$pagePath/cableSetup:servicePlan[3]/cableSetup:planYearlyCost"/>
            </font>
        </xsl:when>
        <xsl:otherwise>
            <span>
            <xsl:value-of
select="$pagePath/cableSetup:servicePlan[3]/cableSetup:planMonthlyCost"/>
            </span>
        </xsl:otherwise>
    </xsl:choose>
</div>

HTML:

<div id="gold">
    <span>Some Text</span>
</div>

-OR-

<dig id="gold">
    <font>Some Text</font>
</div>

desired HTML:

<div id="gold"><span>Some Text</span></div>

-OR-

<div id="gold"><font>Some Text</font></div>


Thank you much in advance,

Kien


 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.