You can use the document() function in XSLT to load an external file. The result of the function is the root document of the file passed as the parameter, so you can use XPath to retrieve whatever information you want from it, for example:
<stylesheet version="1.0" xmlns="https://www.w3.org/1999/XSL/Transform"> <variable name="external" select="document('data.xml')//titles[title_id='BU2075']" /> <template match="/"> <copy-of select="$external" /> </template> </stylesheet>
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.