XslCompiledTransform.CompileToType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compiles an XSLT style sheet to a specified type.
public:
static System::CodeDom::Compiler::CompilerErrorCollection ^ CompileToType(System::Xml::XmlReader ^ stylesheet, System::Xml::Xsl::XsltSettings ^ settings, System::Xml::XmlResolver ^ stylesheetResolver, bool debug, System::Reflection::Emit::TypeBuilder ^ typeBuilder, System::String ^ scriptAssemblyPath);
public static System.CodeDom.Compiler.CompilerErrorCollection CompileToType (System.Xml.XmlReader stylesheet, System.Xml.Xsl.XsltSettings settings, System.Xml.XmlResolver stylesheetResolver, bool debug, System.Reflection.Emit.TypeBuilder typeBuilder, string scriptAssemblyPath);
static member CompileToType : System.Xml.XmlReader * System.Xml.Xsl.XsltSettings * System.Xml.XmlResolver * bool * System.Reflection.Emit.TypeBuilder * string -> System.CodeDom.Compiler.CompilerErrorCollection
Public Shared Function CompileToType (stylesheet As XmlReader, settings As XsltSettings, stylesheetResolver As XmlResolver, debug As Boolean, typeBuilder As TypeBuilder, scriptAssemblyPath As String) As CompilerErrorCollection
Parameters
- settings
- XsltSettings
The XsltSettings to be applied to the style sheet. If this is null
, the Default will be applied.
- stylesheetResolver
- XmlResolver
The XmlResolver use to resolve style sheet modules referenced in xsl:import
and xsl:include
elements. If this is null
, external resources will not be resolved.
- debug
- Boolean
Setting this to true
enables debugging the style sheet with a debugger.
- typeBuilder
- TypeBuilder
The TypeBuilder used for the style sheet compilation. The provided TypeBuilder is used to generate the resulting type.
- scriptAssemblyPath
- String
The base path for the assemblies generated for msxsl:script
elements. If only one script assembly is generated, this parameter specifies the path for that assembly. In case of multiple script assemblies, a distinctive suffix will be appended to the file name to ensure uniqueness of assembly names.
Returns
A CompilerErrorCollection object containing compiler errors and warnings that indicate the results of the compilation.
Remarks
The xsltc.exe
tool is a wrapper around the CompileToType method. Compiling style sheets with the xsltc.exe
will meet the demands of most applications that leverage the use of compiled style sheets. The CompileToType method should be used when building custom compilation tools.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기