Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] DIV tag with class attributes in XSL

From: "Mlachak, Michael \(SAIC\)" <Michael.Mlachak@------>
To:
Date: 11/1/2005 2:41:00 PM
I am trying to mimic the HTML <div class="Padding"></div> in an XSL
style sheet.  The class attribute "Padding" comes from an XML file. I am
using MSXML (2,3,4) and Internet explorer 6 as my browser.  Pertinent
parts of both files are below:

XML File
<?xml version="1.0" encoding="UTF-8"?>
<Menubar>
   <SelectedClass>button1</SelectedClass>
   <NonSelectedClass>button</NonSelectedClass>
   <SeperatorClass>Padding</SeperatorClass>
</Menubar>

XSL File
   <xsl:template name="Padding">
      <div>
            <xsl:attribute name="class"><xsl:value-of
select="//Menubar/SeperatorClass"/></xsl:attribute>
      </div>
   </xsl:template>

Every time the "Padding" template in the XSL file is called, the code
that gets produced by this translation creates the following:

<div class="Padding" />

Which does not render properly in the HTML page in Internet explorer.
That is to say the padding class does not seem to work.
I can hard code the padding to <div class="Padding"></div> in the style
sheet and everything seems to work fine.

Any help or guidance would greatly be appreciated.


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent