This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: ?MSXML transformNode


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@mulberrytech.com
> [mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Serg Stone
> Sent: Wednesday, August 09, 2000 06:33
> To: xsl-list@mulberrytech.com
> 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@iname.com
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]