This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XSL transforming XML to HTML
- To: <xsl-list at mulberrytech dot com>
- Subject: XSL transforming XML to HTML
- From: "Kien Phan" <kphan at simpletel dot com>
- Date: Thu, 6 Jul 2000 19:14:09 -0500
- Reply-To: xsl-list at mulberrytech dot com
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