-bigfoot- | j'ai essayé plusieurs méthodes mais sans succès
Voici mon fichier xsl :
Code :
- <?xml version="1.0" ?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
- <xsl:template>
- <admin>
- <xsl:for-each select="//row" order-by="lb_utilisateur">
- <xsl:copy>
- <xsl:for-each select="nbconnexion">
- <xsl:copy>
- <xsl:value-of/>
- </xsl:copy>
- </xsl:for-each>
- <xsl:for-each select="log_login">
- <xsl:copy>
- <xsl:value-of/>
- </xsl:copy>
- </xsl:for-each>
- <xsl:for-each select="dates">
- <xsl:copy>
- <xsl:value-of/>
- </xsl:copy>
- </xsl:for-each>
- </xsl:copy>
- </xsl:for-each>
- </admin>
- </xsl:template>
- </xsl:stylesheet>
|
et ma page ASP
Code :
- If (xmldoc.childNodes.length = 0) Then
- ' Build the XML document
- Set root = xmldoc.createNode("element", "admin", "" )
-
- xmldoc.appendChild (root)
- ' Queries the database for customer data
- Set objRs = Server.CreateObject("ADODB.RecordSet" )
- objRs.Open SQL, objConn
-
- If not objRs.eof Or Not objRs.bof Then
- objRs.MoveFirst
- End if
-
- 'Loop through the recordset
- Do While Not objRs.EOF
-
- Set onode = xmldoc.createNode("element", "row", "" )
- xmldoc.documentElement.appendChild (onode)
-
- Set inode = xmldoc.createNode("element", "nbconnexion", "" )
- inode.Text = formatNumber(objRs.fields(0),0)
- onode.appendChild (inode)
- Set child = xmldoc.createNode("element", "log_login", "" )
- child.Text = objRs.fields(1)
- onode.appendChild (child)
-
-
- Set child = xmldoc.createNode("element", "dates", "" )
- If objRs.fields(2) <> "" Then
- child.Text = FormatDateTime(objRs.fields(2), 0)
- onode.appendChild (child)
- Else
- child.Text = ""
- onode.appendChild (child)
- end If
- objRs.movenext
- Loop
- objRs.close
- Set objRs = Nothing
-
- End If
- xmldoc.save server.mappath("flux.xml" )
- %>
- <SCRIPT LANGUAGE=javascript for=window event=onload()>
- doc.XMLDocument.async = 0;
- doc.XMLDocument.load("flux.xml" );
- fds.XMLDocument.async = 0;
- fds.XMLDocument.load("tri-last.xsl" );
- doc.XMlDocument.preserveWhiteSpace = 0;
- doc.XMlDocument.loadXML(doc.XMLDocument.transformNode(fds.XMLDocument));
- </SCRIPT>
- <SCRIPT LANGUAGE=javascript>
- <!--
- function tri(champ) {
- fds.XMLDocument.selectSingleNode("//@order-by" ).nodeValue = champ;
- doc.XMlDocument.loadXML(doc.XMLDocument.transformNode(fds.XMLDocument));
- }
- //-->
- </SCRIPT>
- <BODY>
- <DIV>
- <TABLE align="center" DataSrc="#doc" STYLE="font:8pt Verdana; color:#000000; text=#000000" BORDER="1" WIDTH="80%" borderColor="black" cellPadding="0" cellSpacing="0" valign="TOP">
- <THEAD><TR bgColor="#cccccc" borderColorDark="#fcfcfc" borderColorLight="#999999">
- <TD onclick="tri('nbconnexion')" class="tete" align="center">Nombre de connexions</TD>
- <TD onclick="tri('log_login')" class="tete" align="center">login windows</TD>
- <TD onclick="tri('dates')" class="tete" align="center">Dernière connexion</TD>
- </TR></THEAD>
- <TBODY>
- <TR bgColor="#f0f0f0" borderColorDark="#fcfcfc" borderColorLight="#cccccc">
- <TD align="center"><span datafld="nbconnexion"></span></TD>
- <TD align="center"><span datafld="log_login"></span></TD>
- <TD align="center"><span datafld="dates"></span></TD>
- </TR>
|
Est ce que quelqu'un a une idée ?
|