Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "Oleg Tkachenko [MVP]" <oleg@--!----!---------------.--->
To: NULL
Date: 5/6/2004 12:41:00 PM
NicoAgenci wrote:


> 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);

Well, above line is superfluous. Technically here you are starting XSL 
transformation and not using its result. asp:xml control will do 
transformation for you, that's its the only function. You only need to 
provide source document, xsl stylesheet and optional parameters.

> // Source Xml et Xslt pour le Composant AspXml
> 
> aspxmlInfo.Document = xmldocInfo;
> 
> aspxmlInfo.Transform = xsltInfo;

Here is how you can provide parameters to asp:xml control:

aspxmlInfo.TransformArgumentList = argsInfo;

-- 
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com


transparent
Print
Mail
Like It
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