limits / restrictions to included xml files?

  • Is there any set limit to the number of included xml files referenced in the top parent xml that is initially loaded... or any limit to the depth of included xml files?

    i.e.

    Experimenting with different items and am debugging by loading an initial xml that has the cubegrid preview... and then a series of

    Code
    <include url="file.xml" />

    ... each one separating out bits and pieces that I want to play with... like an added logo and different sizes, locations... masks and different effects, etc...


    Next part of the question...
    if something like...

    Code
    loadpano(%1,null,MERGE,BLEND(1));

    is in one xml file... while the

    Code
    action(loadpano,festung2.xml);

    is in a different one... it won't matter, correct... at least not initially?


    I see that hotspots and plugins can be "sticky" with the "keep=true"... how does it work with includes from the original xml?

    - edit - thought about this again and realized that anything from a loaded xml file will probably be able to be defined with it's own "keep" property... so, if I use a "logo.xml" file and use the plugin node to setup my image logo, I can say keep - true and it should carry through... despite being loaded as part of an "included" xml file.

    I know I could experiment and validate... but on some other more complex items that I'm trying to sort out... it'll be good to know what is "supposed" to work and what isn't.
    - end edit -

  • 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:

    Code
    <krpano>
      <plugin name="logo" url="logo.png" />
    </krpano>

    pano.xml:

    Code
    <krpano>
      <include url="subdir/logo.xml" />
      <image>...</image>
    </krpano>

    becomes internally to:

    Code
    <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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!