transform problem

Discussion in 'XML' started by Sparko, Aug 10, 2004.

  1. Sparko

    Sparko Guest

    OK here's one that's puzzlin me!


    xml source
    ----------

    <x yid="1" >
    <x yid="2" >
    <x yid="n" >

    <z yid="1" zid="1" ca1="" ca2="aValue1" ca3=""/>
    <z yid="1" zid="2" ca1="aString1" ca2="" ca3=""/>
    <z yid="1" zid="3" ca1="" ca2="" ca3="aValue2"/>
    <z yid="1" zid="4" ca1="" ca2="aString2" ca3=""/>
    <z yid="1" zid="5" ca1="" ca2="" ca3="aString3"/>
    <z yid="2" zid="1" ca1="" ca2="aValue3" ca3=""/>
    <z yid="2" zid="2" ca1="aString4" ca2="" ca3=""/>
    <z yid="2" zid="3" ca1="" ca2="" ca3="aValue4"/>
    <z yid="2" zid="4" ca1="" ca2="aString5" ca3=""/>
    <z yid="2" zid="5" ca1="" ca2="" ca3="aString6"/>


    xml output required
    -------------------
    <x yid="1" ca1="aValue1" ca2="aString1" ca3="aValue2" ca4="aString2"
    ca5="aString3"/>
    <x yid="2" ca1="aValue1" ca2="aString4" ca3="aValue3" ca2="aString5"
    ca2="aString6"/>
    ...n


    Description
    -----------
    The input xml must be resolved such that attributes are added to the x
    nodes corresponding to the z nodes row with the relationship being yid
    and the set of z nodes always containing five nodes identified by zid.
    For each of the five z nodes that is processed (per yid) a set
    algorithm is applied that extracts the value from the correct ca
    attribute and uses it as the value of the attribute
    that is being inserted into the x node.

    Any thoughts!
     
    Sparko, Aug 10, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KathyB
    Replies:
    0
    Views:
    980
    KathyB
    Jun 24, 2003
  2. PJ
    Replies:
    1
    Views:
    978
    Kathy Burke
    Jun 25, 2003
  3. Lasse Edsvik

    XML/XSL transform problem

    Lasse Edsvik, Nov 25, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    7,100
    armplinker
    Nov 10, 2008
  4. ibiza

    Bind() transform value problem

    ibiza, Feb 1, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    6,113
    katupilar
    Dec 19, 2008
  5. Vlamos

    xml transform problem...

    Vlamos, Oct 2, 2004, in forum: Java
    Replies:
    1
    Views:
    364
    Brusque
    Oct 2, 2004
Loading...

Share This Page