Re: [xsl] Structuring templates

Subject: Re: [xsl] Structuring templates
From: "Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Sep 2017 16:57:16 -0000
-----Original Message-----
From: Martin Honnen martin.honnen@xxxxxx [mailto:xsl-list-
service@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Friday, September 1, 2017 10:47 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Structuring templates

> Are you aware that XslCompiledTransform supports extension objects as
> well as inline code? If you encapsulate your C# code in a class and pass
> that as an extension object with e.g.
> https://msdn.microsoft.com/en-
> us/library/system.xml.xsl.xsltargumentlist.addextensionobject(v=vs.110).as
> px
> when you run XSLT then you don't depend on inline script compilation and
> execution and I think it should also solve the problem you have with
> sharing the C# code.
>
> Obviously that way you need to write and compile the C# separately
> instead of having XslCompiledTransform doing it for the inline code, I
> am not sure whether it is an option.

Yeah, I am constrained by the WIX toolset and it doesn't offer the facility
to pass the code in as a compiled library which I am certain you are correct
in that it would likely solve the issue. I wish xsl v1 and all of msxsl could
just
be banished:)

Thanks,
jlc

Current Thread