![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Xslt Transform using Microsoft.GotDotNet.ExsltTranform in .NET 2.0 Hi, I have a command line project which I am using to transform xml from one format to another, making use of the Microsoft.GotDotNet.ExsltTranform class. This application was originally developed and run in a .NET 1.0 environment but I have recenlty been required to port this over to .NET 2.0 in order to allow it to be run on machines which don not have version 1.0 of the framework. When this application was ported the Transform method on the Microsoft.GotDotNet.ExsltTransform class began working in an unexpected manner: Where the class previously replaced the parameter ‘currentdate’ in the stylesheet with a date time parameter (e.g. “2008-05-06T12:57:09”), it is now simply tranforming currentdate to “T”. I have included the method call below: if (options.ExsltLibPath == null) { xslt.Transform(doc, options.XslArgList, fs); } Where: - ‘doc’ is and instance of ‘System.Xml.XPath.XpathDocument’ - ‘options.XslArgList’ is and instance of ‘System.Xml.Xsl.XsltArgumentList’ containing one parameter named ‘currentdate’ with the value '2008-10-03_10:24:02’. - ‘fs’ is an instance of ‘System.IO.FileStream’ to write the output file. ........Below is the method called within the Microsoft.GotDotNet.ExsltTranform class...... /// <summary> Transforms the XML data in the IXPathNavigable using the specified args and outputs the result to a Stream</summary> public void Transform(IXPathNavigable ixn, XsltArgumentList arglist, Stream stream) { if (_multiOutput) { this.xslTransform.Transform( ixn, this.AddExsltExtensionObjects(arglist), new MultiXmlTextWriter(stream, Encoding.UTF8) ); } else { this.xslTransform.Transform(ixn, this.AddExsltExtensionObjects(arglist), stream); } } |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Removing XSLT use from .Net 1.1 windows service | .NET General | |||
| Merge 2 XML Documents using XSLT Transform | .NET General | |||
| MAML XSLT and XSD? | PowerShell | |||