Hi,
no there are no limits / restrictions to included xml files,
including works as follow:
1. the including file is loaded
2. then it is parsed to resolve all "url" attributes to make them relative to this xml file
3. if there is a "krpano" root node in the include xml file, it will be removed
4. then this included xml code replaces the include node
5. after all include nodes are resolved, krpano starts parsing the final xml file itself
example - this two xml files:
subdir/logo.xml:
|
Source code
|
1
2
3
|
<krpano>
<plugin name="logo" url="logo.png" />
</krpano>
|
pano.xml:
|
Source code
|
1
2
3
4
|
<krpano>
<include url="subdir/logo.xml" />
<image>...</image>
</krpano>
|
becomes internally to:
|
Source code
|
1
2
3
4
|
<krpano>
<plugin name="logo" url="subdir/logo.png" />
<image>...</image>
</krpano>
|
NOTE - the url attribute has changed!
to your second question, yes this is possible,
plugins, hotspots and lensflares are normally removed when loading a new pano,
but when they have the "keep" attribute set to "true" OR a KEEPPLUGINS and/or KEEPHOTSPOTS is set on the loadpano() call they will not be removed and kept,
different to that - "action" definitions are always kept,
only if a new loaded xml defines a "action" that already exists - the new action overwrites the old one
so your code works as supposed
best regards,
Klaus