[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL transforming XML to HTML
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|