Opened 9 years ago
Closed 9 years ago
#1223 closed defect/bug (fixed)
Error in xml handling using xi:include
Reported by: | mineque | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | port/windows | Version: | git master |
Severity: | normal | Keywords: | |
Cc: |
Description
When trying to include OSD configs from external file like that:
<xi:include href="./mineque-osd-darkblue_local.xml"/> <xi:include href="mineque-osd-darkblue_local.xml"/>
which is stored in main dir and contain for example:
<osd enabled="yes" type="image" x="0" y="0" src="images/topbar.png" /> <osd enabled="no" type="button" x="50" y="-90" command="play()" src="./dark/appbar.control.play.png" /> <osd enabled="yes" type="image" x="0" y="0" src="images/topbar.png" /> <osd enabled="yes" type="image" x="0" y="380" h="170" src="./images/bottombar.png" />
Navit will read only first line of file and ignoring rest of the file.
Tested with Kazer and seems to occur only in windows
Change History (9)
comment:1 Changed 9 years ago by tryagain
comment:2 Changed 9 years ago by mineque
navit:xinclude:Unable to include mmineque-osd-darkblue_local.xml
adding extra "m" letter and broke include
comment:3 Changed 9 years ago by kazer
Actually using an include without the root item works, at least on Linux. It might be related to the xml parser used. But indeed using a more xml-compliant config with a root element would be better. I'll update the example I gave to Mineque earlier
comment:4 Changed 9 years ago by tryagain
mineque, what navit build do you use?
I have tested it on http://download.navit-project.org/navit/win32_cmake/svn/navit-svn-5827.zip build, looks like it works fine for me, no chars duplication, elements were loaded with <xi:include href="./osd.xml" xpointer="xpointer(/xiroot/*)"/>
Btw, what platform do you run it on, some desktop windows version? IIRC WinCE has no "current directory" semantics...
comment:5 Changed 9 years ago by mineque
As in ticket
port windows (32) build 5827 host Windows 7 x64
comment:6 Changed 9 years ago by mineque
That version is working: http://download.navit-project.org/navit/win32_cmake/svn/navit-svn-5827.zip
That is not working: http://download.navit-project.org/navit/win32/svn/navit-svn-5827.zip
comment:7 Changed 9 years ago by mineque
- Resolution set to fixed
- Status changed from new to closed
comment:8 Changed 9 years ago by tryagain
- Resolution fixed deleted
- Status changed from closed to reopened
There's actually a problem on win32* processing xi:includes with href not having any path symbols inside (/ or \). So there's no problem with both aforementioned versions processing href="./osd.xml" or href="../osd.xml" or href="includes/osd.xml" or whatever.
But both versions duplicate first char of href="osd.xml" and the likes.
comment:9 Changed 9 years ago by tryagain
- Resolution set to fixed
- Status changed from reopened to closed
Fixed with r5028
navit has a feature to read broken include files on some platforms.
By xi:include specification, file included with xi:include should contain a single root element.
Please try <xi:include href="mineque-osd-darkblue_local.xml" xpointer="xpointer(/xiroot/*)"/> with file