Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - .NET , XML , XSL -> XsltArgumentList : Question ? [Thread Next] Re: .NET , XML , XSL -> XsltArgumentList : Question ?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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
