• Hi,

    an xml element can be always defined either this way:

    Code
    <element attributes ... />

    or this way:

    Code
    <element attributes ...>
    </element>

    technically they are equal, but when an element should have other 'sub/child-elements', then the second case is required,
    e.g.

    Code
    <element attributes ...>
      <childelement attributes />
    </element>

    Best regards,
    Klaus

  • Maybe it makes it understandable for you but that is all volapyk for me when I look at this
    ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />

    </layer>
    </layer>
    </layer>
    </layer>

    They do not even correspond to the number of <layer tags

    Hans
    and if I remove just one of them I get an error.

  • I can see that what appears to be childs do not have any parent attribute.
    Instead it seems to have several endtags.

    I am not a coder but I usually am able to understand the codes using common sense. This does not make common sense to me.

    Hans

  • Hi,

    in the tour.xml, the layer xml elements with 'children' elements/nodes were defined this way:

    Code
    <layer ...>
       ...
    </layer>


    there the element starts with '<layer ...>' and ends with '</layer>'

    but the layer xml element without any children elements were defined this way:

    Code
    <layer ... />


    there the element starts with '<layer' and ends with '/>'

    so each element is closed of course, there are no additional or too much closing elements,

    best regards,
    Klaus

  • Sorry thats even more volapyk to me.

    Here is your code from the skin.

    <!-- Skin Layout -->

    <layer name="skin_scroll_window" type="container" keep="true" align="leftbottom" width="100%" height="100%" x="0" y="60" y_shown="60" y_hidden="-2" maskchildren="true">
    <layer name="skin_scroll_layer" type="container" align="leftbottom" width="100%" height="100%" x="0" y="-100%">
    <layer name="skin_topborder" url="vtourskin.png" crop="2|0|60|12" align="topleft" edge="bottomleft" width="100%" height="12" x="0" y="0" enabled="false" />
    <layer name="skin_title" url="%SWFPATH%/plugins/textfield.swf" align="lefttop" edge="leftbottom" width="95%" height="32" autoheight="true" x="5" y="-3" zorder="4" enabled="false" background="false" border="false" css="text-align:left; color:#FFFFFF; font-family:Arial; font-weight:bold; font-size:16px;" textshadow="1" visible="false" />

    Here ends the first containerset with 3 layers in. I would assume and I also read what you say that it should have an endtag here, but there is nothing.

    <layer name="skin_scroll_container" type="container" bgcolor="0x000000" bgalpha="0.5" align="lefttop" width="100%" height="100%" x="0" y="0" maskchildren="true">
    <layer name="skin_thumbs" state="hidden" url="%SWFPATH%/plugins/scrollarea.swf" alturl="%SWFPATH%/plugins/scrollarea.js" direction="h" visible="false" align="top" width="100%" height="100" onloaded="skin_updatescroll();" />
    <layer name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();"> <maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" />
    <spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />

    <layer name="skin_map_androidzoom_in" url="vtourskin.png" effect="glow(0,0.5);" crop="9|512|46|64" align="right" x="0" y="-40" zorder="2" ondown="layer[skin_map].zoomin(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />
    <layer name="skin_map_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" crop="73|512|46|64" align="right" x="0" y="+40" zorder="2" ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />
    </layer>
    </layer>
    </layer>
    </layer>

    Instead the next containerset for the thumbs and the map ends with 4 layer endtags
    As there are no parent tags I assume that everything between the first layer with maskchildren=true and the endtag are children.


    Hans

  • It makes sense if you have indention. If its "> the next tag is a child.

  • Sorry Sacha but now you are talking in riddles. Indention means space,

    .......may be used for what looks like a space in front of this line.

    What does that have to do with the 4 layer endtags which seems to have no real reference to anything above them.

    I can see now that if I count the numbers without end tag above them it make sense but it is confusing as you have a mix of layers with and without endtags.
    As far as I understand it is layers within layers which is not a good way I think.

    I can see that it makes sence in some of the layers later in the skin.

    Its the same as what I said about the container for maps and thumbs are mixed together instead of making them separate. It is very confusing and makes it difficult to edit them. Also the idea with children that have no parent tag is confusing.

    When you are doing codes for Photographers of which 90% have no idea of what is going on in the xml you have to do things much simpler.
    As someone said on the Facebook Panoramic Photographers . Coders has ha different brain then most of us photographers have. They can do great things with coding but have very difficult to see how difficult it is for most of us to understand it.

    Hans

    Edited 4 times, last by HansNyb (September 22, 2012 at 12:39 PM).

  • The indention is to show it more clearly. When it is "> it is not closed and is still open. All following tags are the children.

    Code
    <layer name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">
    				<maptypecontrol visible="true" align="righttop" x="5" y="5" buttonalign="v" />				
    <spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
    				<layer name="skin_map_androidzoom_in" url="vtourskin.png" effect="glow(0,0.5);" crop="9|512|46|64" align="right" x="0" y="-40" zorder="2" ondown="layer[skin_map].zoomin(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />
    				<layer name="skin_map_androidzoom_out" url="vtourskin.png" effect="glow(0,0.5);" crop="73|512|46|64" align="right" x="0" y="+40" zorder="2" ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />
    			</layer>

    ==

    Code
    <plugin name="skin_map" state="hidden" url="" flash_url="%SWFPATH%/plugins/bingmaps.swf" html5_url="%SWFPATH%/plugins/bingmaps.js" visible="false" align="lefttop" width="100%" height="50%" x="0" y="0" zorder="1" lat="" lng="" zoom="12" bgalpha="0" maptype="satellite" onmapready="skin_addmapspots();">
    <maptypecontrol parent="skin_map" visible="true" align="righttop" x="5" y="5" buttonalign="v" />
    <spotstyle name="DEFAULT" url="vtourskin_mapspot.png" activeurl="vtourskin_mapspotactive.png" edge="bottom" x="-5" y="-8" scale="0.5" />
    <plugin name="skin_map_androidzoom_in" parent="skin_map" url="vtourskin.png" effect="glow(0,0.5);" crop="9|512|46|64" align="right" x="0" y="-40" zorder="2" ondown="layer[skin_map].zoomin(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />
    <plugin name="skin_map_androidzoom_out" parent="skin_map" url="vtourskin.png" effect="glow(0,0.5);" crop="73|512|46|64" align="right" x="0" y="+40" zorder="2" ondown="layer[skin_map].zoomout(); skin_buttonglow(get(name));" onup="skin_buttonglow(null);" devices="Android+Tablet+Flash" />


  • Hi,

    I have tried here to visualize the start and end points from each xml element:


    Quote

    Another thing I found in the skin.- Klaus uses a <Krpano> </krpano> division within the xml that actually starts and ends with <krpano>

    That's more a 'trick', <krpano> xml elements were ignored when mapping the xml structure to the working data structure.
    e.g. the following xml structure:

    Code
    <krpano xyz="123">
      <abc xyz="123" />
      <krpano fgh="123" />
      <stuff>
        <node name="n1" val="123" />
      </stuff>
    </krpano>

    will be mapped to:

    Code
    xyz=123
    abc.xyz=123
    fgh=123
    stuff.node[n1].val=123

    In the default vtourskin.xml these <krpano> elements plus the devices setting there, were used to make these xml parts only be appearing on specific devices.

    Best regards,
    Klaus

Participate now!

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