Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including XML and XSL

Status
Not open for further replies.

acsooley

Programmer
Nov 13, 2002
32
CA
I would like to know how to use 2 different XML and XSL files to create a page. I have a main xml and xsl file. Right now everything is in these 2 files. I would like to seperate it. Sort of like using includes in asp. I would like to have a menu file where the xsl style sheet creates most of the page from the main xml file but when it comes to the menu it will get the contents for the menu, from a different xml file.

If this doesn't make any sense, let me know.

I'm new at this and I dont know if I'm asking it right.

Thanks
Adam Sooley
 
Add the extra xml files as variables as such:
<xsl:variable name=&quot;file1&quot; select=&quot;document('file1.xml')/root&quot;/>

import or include the XSL files using the xsl:import or xsl:include

<xsl:include href=&quot;default_templates.xsl&quot;/> Build web applications faster with a few lines of XML Code using DataML[tm]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top