I know a schema can include an .xsd in its definition, but can an XML file include actual elements from another XML document? Basically, I have an XML config file, part of which needs to be shared between subsystems (a shared folder location for writing files). The file builder classes I'm working with need to know this path, but they also need some other information which is only related to them; the other subsystem doesn't need to know about these extra configurations. So I'd like to share an XML file between systems for a common configuration, but also have a separate XML file for my file builders, but have that XML file include the information in the shared one. *begins to babble incoherently*
I think it might make sense to have each of the (separate) XML config files, have the name of the common one. Then, have the code that processes the config file interpret the reference to the common file and read that one as well.
If you are doing ant build, the common part as XML fragnent is stored in a file, then the build.xml will include an external system entity. This is a kind of standard way to do it. If it is configuration, we use component replacement to include other well-formed xml files.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop