Is it possible to perform a transform on multiple input XML files?
It doesn't appear to be possible using XslCompiledTransform
, but is there an alternative way of applying an XSLT?
Is it possible to perform a transform on multiple input XML files?
It doesn't appear to be possible using XslCompiledTransform
, but is there an alternative way of applying an XSLT?
Apply the transformation to each input XML file individually and compose the resulting XML documents into a single document.
Compose the input XML files into a single document and apply the transformation, e.g.
XElement root = new XElement("root", XElement.Load("file1.xml"), XElement.Load("file2.xml"), XElement.Load("file3.xml")); XslCompiledTransform transform; transform.Transform(root.CreateReader(), output);
You can use the XSL function document() in your XSLT to reference an external XML file.