Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon 36 posts 59 karma points
    Jan 27, 2011 @ 13:38
    Jon
    0

    Unusual XML structure generated

    This relates to Umbraco Version: v 4.5.2 (Assembly version: 1.0.3891.20719) using the new Schema (not the Legacy Schema)

    If I have a document type called DocType1 that has 3 properties; PropertyA, PropertyB and PropertyC.

    When I create a Content Item from this type and populate all of the properties the following XML is generated (I have removed the attributes as this is a structural issue so they are not relevant):

    <DocType1>

      <PropertyA>value</PropertyA>

      <PropertyB>value</PropertyB>

      <PropertyC>value</PropertyC>

    <DocType1>

    If I leave PropertyA unpopulated then I get the following structure returned:

    <DocType1>

      <PropertyA>

        <PropertyB>value</PropertyB>

        <PropertyC>value</PropertyC>

      </PropertyA>

    <DocType1>

    This only seems to happen if the first property is not populated as different combinations of leaving PropertyB or PropertyC (or both) empty do not produce the same behaviour.

    This obviously creates a problem when writing XSLT as the structure is inconsistent depending on whether the first property is populated.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 27, 2011 @ 22:23
    Jan Skovgaard
    0

    Hi Jon

    that sure seems like a bug. I guess that there is a chance that this might have been fixed with 4.6.1 - But don't know if you have the possibility to upgrade the solution in question perhaps?

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft