Project

Profile

Help

C# samples

Added by Anonymous almost 18 years ago

Legacy ID: #3769351 Legacy Poster: Antonie Botes (antonie)

According to the documentation there are C# samples available in the resource file. "Example applications for .NET The /samples/cs directory contains four sample applications written in C#, designed to illustrate use of the Saxon API available in the Saxon.Api namespace. " That is a quote from resources\doc\samples\dotnetsamples.html from the resource file. I don't seem to have the sample files in my resource file. Does anyone know where I can find it? Thanks, Antonie


Replies (3)

Please register to reply

RE: C# samples - Added by Anonymous almost 18 years ago

Legacy ID: #3770367 Legacy Poster: Sudarshan Murthy (smurthy)

Funny, I have exactly this question. Also, I have some questions about the C# code in the "api" and "cmd" directories: 1. The code in the file 'Transform.cs' references a type 'com.saxonica.Validate'. Where is this type defined? 2. Are (Visual Studio) projects for the contents of the 'api' and 'cmd' directory available? Questions such as #1 can easily be answered if the projects are available. It seems like the projects must exist somewhere because binaries for the code in the "cmd" directory is included in the .NET distribution. 3. What is the contents of the "api" directory for? Are these examples? Frankly, I am a little lost/overwhelmed (don't know which yet). Thanks for your patient reading. I love to get started using Saxon.NET for some research. SUN.

RE: C# samples - Added by Anonymous almost 18 years ago

Legacy ID: #3773908 Legacy Poster: Michael Kay (mhkay)

Apologies for the delay in responding. For some reason SourceForge has stopped sending me notifications of forum posts. The c# samples were accidentally omitted from the Saxon 8.7.1 saxon-resources.zip file. You can find them in the Saxon 8.7 version of the file. Regarding Sudarshan's questions: 1. The code in the file 'Transform.cs' references a type 'com.saxonica.Validate'. Where is this type defined? Answer: it is in the saxon8sa.dll assembly. I suspect this means that if you want to recompile Transform.cs, you will either need to remove this branch of the code (which is needed only for Saxon -SA), or you will need to download the Saxon-SA executable. You won't actually need a Saxon-SA license key unless you want to execute the code. 2. Are (Visual Studio) projects for the contents of the 'api' and 'cmd' directory available? Questions such as #1 can easily be answered if the projects are available. It seems like the projects must exist somewhere because binaries for the code in the "cmd" directory is included in the .NET distribution. Answer: My first version of this code was all built using command line interfaces rather than using Visual Studio. I have recently started using VS, and I will think about whether to publish the project(s). It's a small amount of code with a rather complex project structure (because of the number of .exe entry points) - perhaps someone with more VS experience could tell me how to simplify it! 3. What is the contents of the "api" directory for? Are these examples? Frankly, I am a little lost/overwhelmed (don't know which yet). Answer: the code in the "api" directory is used to build the Saxon.Api assembly, which provides a .NET front end to the Saxon run-time DLL. You could write directly to the DLL, but the interfaces are rather Java-oriented, and you would need to understand the IKVMC technology which maps .NET types to Java classes. I hope this helps.

RE: C# samples - Added by Anonymous almost 18 years ago

Legacy ID: #3778151 Legacy Poster: Sudarshan Murthy (smurthy)

Thanks for the info. I have the examples from the 8.7 build.

    (1-3/3)

    Please register to reply