Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


.NET , XML , XSL -> XsltArgumentList : Question ?

From: "NicoAgenci" <njoly@--------.--->
To: NULL
Date: 5/6/2004 9:20:00 AM
Hello,

I have a page in .net (DEFAULT.ASPX), i load a XmlDocument, and a
XslTransform to Add a XsltArgumentList (with the param : urlPage), and send
all to a <asp:xml> in the page.

The <asp:xml> is good with xml and xsl, but the param is not fill with the
value ?

Do you have a solution ??? Thanx

---
DEFAULT.ASPX :
<script language="C#" runat="server">

private void Page_Load(object sender, System.EventArgs e)

{

String xmlPath = Server.MapPath("/data/page.xml") ;

String xslPath = Server.MapPath("/xsl/i_infoPage.xsl") ;

String strUrlPage = "/default.aspx";

String xpathPage = "page[url='" + strUrlPage + "']";


// Nouvo XmlDoc pour l'affichage des Infos de Page

XmlDocument xmldocInfo = new XmlDocument();

xmldocInfo.Load(xmlPath);

XslTransform xsltInfo = new XslTransform();

xsltInfo.Load(xslPath);

// Crée un Arg pour le passage en Xslt du Composant Asp:Xml

XsltArgumentList argsInfo = new XsltArgumentList();

argsInfo.AddParam("urlPage","", "'Nico'");

// Réalise la transformation

xsltInfo.Transform(xmldocInfo, argsInfo);


// Source Xml et Xslt pour le Composant AspXml

aspxmlInfo.Document = xmldocInfo;

aspxmlInfo.Transform = xsltInfo;

}

</script>

<asp:xml ID="aspxmlInfo" runat="server"></asp:xml>

DEFAULT.ASPX : FIN

---

I_INFOPAGE.XSL :



<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:output method="html" indent="no" />

<xsl:param name="urlPage" />

<xsl:template match="/">

<xsl:apply-templates select="//page[userCreation=$urlPage]" />

</xsl:template>

<xsl:template match="page">

<table class="mainTable" border="0" cellpadding="0" cellspacing="0"
align="center" bgcolor="#FFFFFF">

<tr align="left" valign="top">

<td class="infoPage" style="padding-left: 209px"><xsl:value-of
select="userMiseajour" /> - <xsl:value-of select="dateMiseajour" /></td>

<td width="200" align="right" class="infoPage" style="padding-right:
8px">vu: <xsl:value-of select="vu" /></td>

</tr>

</table>

</xsl:template>

</xsl:stylesheet>

I_INFOPAGE.XSL :FIN





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