0

Using Microsoft® XSL processor. , .NET 3.5 , XSLT 1.0

Is there any way to unzip a zip file (*.zip) using XSLT 1.0?

I have tried to generate a C# script within XSLT to do the job but since I am using .NET 3.5 , I am limited in terms of the .net libraries can be used and It is completely blocks me at the moment.

My questions:

  1. Is there any way to unzip a zip file ( *.zip) using XSLT ( based on the versions of platform and language mentioned above)?
  2. Can I call/use a third party library inside?
  3. I am happy with any solution available in JavaScript too
  4. I know shell32.dll can do decompression too but how can I call shell32.dll from XSLT?

Thanks,

Azi
  • 49
  • 1
  • 5
  • 1
    I am not familiar with the built-in APIs of .NET 3.5 to unzip ZIP files but with .NET and XslCompiledTransform it doesn't really matter whether you want to use C# from XSLT with libraries/APIs of the .NET framework itself or with third party libraries, use an extension object https://learn.microsoft.com/en-us/dotnet/standard/data/xml/xslt-extension-objects on the .NET side that exposes any function you want to call to XSLT and as long as the XSLT is executed with the right permissions you are able to use any .NET API. – Martin Honnen May 17 '19 at 06:54
  • Even with `msxsl:script` you should be able to reference other assemblies https://learn.microsoft.com/en-us/dotnet/standard/data/xml/script-blocks-using-msxsl-script#assemblies – Martin Honnen May 17 '19 at 06:54
  • Maybe this will help: https://stackoverflow.com/questions/3012932/read-a-remote-zipped-xml-with-just-xsl – brijber May 17 '19 at 07:15
  • Any particular reason you want to stick with such an old version of XSLT, when the .NET environment is well served with more modern processors from third parties? – Michael Kay May 17 '19 at 11:11

0 Answers0