none
Cannot use XmlUrlResolver.GetEntityAsync with XslCompiledTransform RRS feed

  • Question

  • Hi

    I want to use GetEntityAsync in a custom XmlUrlResolver.

    It looks like you can only use it with the stylesheet but not any XSLT import or include elements:

    	var xmlReaderSettings = new XmlReaderSettings
    	{
    		XmlResolver = resolver,
    		Async = true
    	};
    
    	var stylesheet = XmlReader.Create("stylesheet.xslt", xmlReaderSettings);
    
    	XslCompiledTransform xslt = new XslCompiledTransform();
    	xslt.Load(stylesheet, null, resolver);

    The resolver needs to be a property of XmlReaderSettings to set the Async flag but the XslCompiledTransform.Load method only accepts a resolver to use with the XSLT import or include elements.

    Am I missing something or is this not possible with the current implementation?

    Thanks
    Andrew

    Thursday, August 3, 2017 2:37 PM

Answers

All replies