Subject: RE: ?MSXML transformNode From: "Paulo Gaspar" <paulo.gaspar@xxxxxxxxxxxx> Date: Wed, 9 Aug 2000 15:25:47 +0200 |
What parser are you using? MSXML3 or the one with IE5. The one with IE5 implements non standard XSLT. Please check this FAQ to better understand MSXML issues: http://www.netcrucible.com/xslt/msxml-faq.htm Have fun, Paulo > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Serg Stone > Sent: Wednesday, August 09, 2000 06:33 > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: ?MSXML transformNode > > > Hello, All > > Can anybody help me with MS XSLT??? > > I have XML file and XSLT file that converts it into HTML. The result > is simple HTML table. It has <COL> specifications for all columns. For > some columns <COL align="right"> is used. > When I apply transformNode() function to the table right align is > changed by simple left align. Is it a bug or feature of MSIE? > > Can anyone test if it is problem of mine? > Following is an example. > ============= > XML-file: > <?xml version="1.0"?> > <?xml:stylesheet type="text/xsl" href="test.xsl" ?> > <tbl> > <tbl_head> > <tbl_row> > <c0>Col0</c0> > <c1>Col1</c1> > </tbl_row> > </tbl_head> > <tbl_col> > <tbl_row> > <c0 /> > <c1 /> > </tbl_row> > </tbl_col> > <tbl_body> > <tbl_row> > <c0>4</c0> > <c1>1</c1> > </tbl_row> > <tbl_row> > <c0>2</c0> > <c1>3</c1> > </tbl_row> > </tbl_body> > </tbl> > ========================= > XSL file: > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > <xsl:template match="/"> > <HTML> > <SCRIPT><xsl:comment><![CDATA[ > function on_head_click(){ > //alert('sdfg'); > tbl.innerHTML=source.documentElement.transformNode(stylesheet); > } > ]]></xsl:comment></SCRIPT> > <SCRIPT for="window" event="onload"><xsl:comment><![CDATA[ > stylesheet=document.XSLDocument; > source=document.XMLDocument; > ]]></xsl:comment></SCRIPT> > <BODY bgcolor="threedface" topmargin="0" leftmargin="0"> > <DIV id="tbl"><xsl:apply-templates select="tbl" /></DIV> > </BODY> > </HTML> > </xsl:template> > <!--==--> > <xsl:template match="tbl"> > <span style='background-color:#777777'> > <TABLE id="lines" border="1" align="center" bordercolor="#bbbbbb" > cellpadding="0" cellspacing="1"> > <xsl:apply-templates select="tbl_head" /> > <xsl:apply-templates select="tbl_col" /> > <xsl:apply-templates select="tbl_body" /> > </TABLE> > </span> > </xsl:template> > > <xsl:template match="tbl_head"> > <xsl:apply-templates select="tbl_row" /> > </xsl:template> > > <xsl:template match="tbl_head/tbl_row"> > <TR> > <xsl:for-each select="*"> > <TH> > <xsl:attribute name="onClick">on_head_click()</xsl:attribute> > <xsl:value-of select="." /> > </TH> > </xsl:for-each> > </TR> > </xsl:template> > > <xsl:template match="tbl_col"> > <xsl:apply-templates select="tbl_row" /> > </xsl:template> > > <xsl:template match="tbl_col/tbl_row"> > <TR> > <xsl:for-each select="*"> > <COL align="right"> > <xsl:value-of select="." /> > </COL> > </xsl:for-each> > </TR> > </xsl:template> > > <xsl:template match="tbl_body"> > <xsl:apply-templates select="tbl_row" /> > </xsl:template> > > <xsl:template match="tbl_body/tbl_row"> > <TR> > <xsl:for-each select="*"> > <TD> > <xsl:value-of select="." /> > </TD> > </xsl:for-each> > </TR> > </xsl:template> > > </xsl:stylesheet> > ============================== > -- > Best regards, > Serg mailto:serg_stone@xxxxxxxxx > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
?MSXML transformNode, Serg Stone | Thread | Re[2]: ?MSXML transformNode, Serg Stone |
RE: Complete XSLT Reference and int, Matt Watson | Date | RE: MSXML document() function., Paulo Gaspar |
Month |