Alex Rivera | Logout

Including an XML file in an XML/XSL file

Asked 2011-01-16T01:46:53.687
25

So currently I'm doing some XML-> XSLT-> (HTML5/CSS3) work. Right now I have a menu.xml file, and I'd like to include it in either the XSL file or the XML page. I've done lots of searching, but I'm unable to find a straightforward answer.

So, how do I include an XML file in to another XML file or in to a XSL file?

Edit: By include, I mean referencing/loading it from another file, not copy and pasting it or simply embedding it.

Edit
Report

1 Answer

0

If simply embedding the file inside the XML file is not a solution then adding a url field that the interpreting program reads should be added- you're basically asking for the equivalent of an include(menu.xml) or require(xml), but in an XML file.

So since you are writing the program that is intepretting the file you can add an <externalMenuTagThatYouDecideToAddToTheBaseXmlFile> tag or whatever you want to call it that you will read and insert menu.xml's root note the place of the <externalMenuTagThatYouDecideToAddToTheBaseXmlFile>.

Good luck and may your programs always compile.

answered 2011-01-16T02:20:57.610

Your Answer