Richard wrote:
> Hi,
>
> is it possible to split it up into several smaller configuration files?

Yes. Works well.

You can even include folders. Which is really great for distro integration.
(conf.d style)


I'm having trouble accessing the navit site right now. That is why I
include a copy of the section from googles page cache.

Original URL:
http://wiki.navit-project.org/index.php/Configuring_Navit#Support_for_XInclude.2FXPath

 Support for XInclude/XPath

Navit has support for a small subset of XInclude/XPath. Supported is a tag
like

<xi:include href="some_file" xpointer="xpointer_stuff" />

You can leave out either href (xi:include refers to the same file it is in
then) or xpointer (xi:include then refers the complete file), but not
both. The href attribute refers to a file relative to the current
directory. It is suggested to use the complete path, such as
/home/root/.navit/navit-vehicles.xml.

href is expanded with wordexp internally, so you can do stuff like:

<xi:include href="$NAVIT_SHAREDIR/maps/*.xml" />

Some examples on the supported syntax:

<xi:include
xpointer="xpointer(/config/navit/layout[@name='Car']/layer[@name='points'])"
/>

references to the XML-Tag "layer" with attribute "name" of value "points"
within an XML-Tag "layout" with attribute "name" of value "Car" within an
XML-Tag "navit" within an XML-Tag "config".

<config xmlns:xi="http://www.w3.org/2001/XInclude";>
<xi:include href="$NAVIT_SHAREDIR/navit.xml"
xpointer="xpointer(/config/*[name(.)!='navit'])"/>
<navit center="4808 N 1134 E" zoom="256" tracking="1" cursor="1"
orientation="0">
<xi:include href="$NAVIT_SHAREDIR/navit.xml"
xpointer="xpointer(/config/navit/*[name(.)!='vehicle'])"/>
</navit>
</config>

Use this as your $HOME/.navit/navit.xml and you will get everything under
<config>..</config> except <navit>..</navit> (first xi:include), plus
<navit> as specified plus everything from navit within config, except the
vehicle definitions (second xi:include).



------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Navit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/navit-users

Reply via email to