Hi,
> You can even include folders. Which is really great for distro integration.
> (conf.d style)
awesome.
> 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" />
so stuff like
<map type="garmin" enabled="yes" data="/home/rz/mapfolder/*.img"
debug="4"/>
would also work as expected? Totally awesome..
> 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).
Looks like that would be far beyond my original intentions - my original
question
was because I thought it would be handy to have things like gui
configurations,
map configurations and rendering configurations in separate config files -
making
them easily swappable.
Richard
---
Name and OpenPGP keys available from pgp key servers
------------------------------------------------------------------------------
BlackBerry® 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