Peter Amiri schrieb:
>   <host host-name="">
>       <host-alias></host-alias>
>       <root-directory>/home/path_to_domain/public_html</root-directory>
>       <web-app id="/" root-directory="." />
>   </host>

> I wanted to know if there was a way to write these individual blocks
> into separate files that got included or imported by the Resin conf
> file.

In addition to the resin:import mechanism, you could also use the XML
feature of so-called "external general parsed entities" (EGPE), which
would allow you to append your <host> configuration snippets to a file
called, say, "vhosts.ent", that is included in your configuration file
using an entity declaration and an entity reference, like this:

<!DOCTYPE resin [
<!ENTITY hosts SYSTEM "vhosts.ent" >
]><!-- DOCTYPE at the top of your resin.xml to declare the entity -->


<!-- At the appropriate place, put the entity reference. -->

Note that the EGPE doesn't have to be a valid *document*, so it can be
like a logfile:


Maybe this gives you additional ideas on how to modularize your XML.

Michael Ludwig

resin-interest mailing list

Reply via email to