Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
How to use in VB.NET?
Added by Anonymous over 18 years ago
Legacy ID: #3714555 Legacy Poster: Daniel Heinze (dheinze)
(I also posted this msg on saxon-help, before noticing that HELP seems to have more traffic... ) Yesterday I downloaded and installed Saxon on a Windows XP box with .NET Framework 1.1. The command line version works fine. I added the saxon8api.dll to the references of a vb.net solution and have access to the Saxon classes, but I'm having trouble figuring out how to use them. My download does not have the cs/samples directory that is referenced in the documentation. Can anyone supply info or examples on using Saxon in either vb.net or c#.net? I'm trying to use the XSLT Transform. Thanks / Dan
Replies (5)
Please register to reply
RE: How to use in VB.NET? - Added by Anonymous over 18 years ago
Legacy ID: #3714572 Legacy Poster: Michael Kay (mhkay)
The samples directory is in the resources.zip file which you can find at http://prdownloads.sourceforge.net/saxon/saxon-resources8-7-1.zip?download It's only C# I'm afraid - if anyone would like to offer equivalents in VB.NET I'll be pleased to take them on board. The resources file also includes a local copy of the API documentation to be found at http://www.saxonica.com/documentation/dotnetdoc/index.html Michael Kay
RE: How to use in VB.NET? - Added by Anonymous over 18 years ago
Legacy ID: #3714662 Legacy Poster: Daniel Heinze (dheinze)
Thanks. I had downloaded the resources8-7-1.zip file, but it doesn't seem to have the C# samples. I downloaded again, but still no luck. Here's what I've been trying in vb.net Dim saxonP As New Saxon.Api.Processor Dim c As Saxon.Api.XsltCompiler Dim x As Saxon.Api.XsltExecutable Dim d As Saxon.Api.XmlDestination Dim t As Saxon.Api.XsltTransformer c = saxonP.NewXsltCompiler() x = c.Compile(New FileStream("d:/saxonica/CDATranslation.xsl", FileMode.Open, FileAccess.Read)) t = x.Load() t.Run(d) This crashes on the x = c.Compile... line due to a null object reference. Also, it's not clear how to specify the input XML file to be transformed. Finally, how do I convert d, a Saxon.Api.XmlDestination, to something more familiar in .NET? I don't need it in vb.NET, C# examples would be fine. Thanks / Dan
RE: How to use in VB.NET? - Added by Anonymous over 18 years ago
Legacy ID: #3715594 Legacy Poster: Don Burden (donburden)
I've been looking for cs samples too and couldn't find them. They appear to be missing in saxon-resources8-7-1.zip. I downloaded saxon-resources8-7.zip, and found a samples/cs directory in there.
RE: How to use in VB.NET? - Added by Anonymous over 18 years ago
Legacy ID: #3715680 Legacy Poster: Michael Kay (mhkay)
Yes, I'd just about got that far in my investigations too. There seems to have been a build error in constructing the 8.7.1 version of the file. Sorry about that. Don: if I'm not mistaken you sent off for a Saxon-SA evaluation license earlier today. The email containing the license bounced saying the email address was unknown. Please drop me a note (mike at saxonica.com) with your correct email address.
RE: How to use in VB.NET? - Added by Anonymous over 18 years ago
Legacy ID: #3715847 Legacy Poster: Daniel Heinze (dheinze)
Per Don's response, I got the 8.7 resource file. Using the C# examples, I was able to get it working in vb.net with no problems. Thanks.
Please register to reply