Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > transform problem

Thread Tools

transform problem

Posts: n/a
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"
<x yid="2" ca1="aValue1" ca2="aString4" ca3="aValue3" ca2="aString5"

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!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind() transform value problem ibiza ASP .Net 8 12-19-2008 07:10 PM
XML/XSL transform problem Lasse Edsvik ASP .Net 3 11-10-2008 02:17 PM
blocking I/O with javax.xml.parsers.DocumentBuilder.parse() and javax.xml.transform.Transformer.transform() Java 1 03-27-2005 06:56 AM
Re: More info on XML TRANSFORM in IE6, just not PJ ASP .Net 1 06-25-2003 01:59 PM
XML TRANSFORM - Serious problem - nested element causes Index error...why oh why??? KathyB ASP .Net 0 06-24-2003 07:37 PM