[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Identity Transform and Default Templates, I think.
Me again. As I was moving my lessons learned over to the real application, I noticed that I need a bit more flexibility... Given this input: <C3PO> <SOUL id="anewmachine">The Soul</SOUL> <BD id="foo"> <HEAD>The Head</HEAD> <TR> <RF>The Right Foot</RF> <RK>The Right Knee</RK> <HR>The Heart</HR> <Ext id="extid"><ANewLimb>Some new Limb</ANewLimb></Ext> <AnotherNewLimb>Another New Limb</AnotherNewLimb> </TR> </BD> </C3PO> I'd like to have the AnotherNewLimb element copied to the Torso element of the output document as a sibling of Extension, Chest and RightLeg. But, I'd like to be able to not be tied to the element name, much like I can rename SOUL and HEAD and still get the node copied. If I add <xsl:apply-templates/> to the TR template, I wind up applying the RF, RK, HR and Ext templates twice - the output looks like this: <SeeThreePO> <SOUL id="anewmachine">The Soul</SOUL> <Body id="foo"> <HEAD>The Head</HEAD> <Torso> <Chest> <Heart>The Heart</Heart> </Chest> <RightLeg> <RightFoot>The Right Foot</RightFoot> <RightKnee>The Right Knee</RightKnee> </RightLeg> <Extension id="extid"> <ANewLimb>Some new Limb</ANewLimb> </Extension> <RightFoot>The Right Foot</RightFoot> <RightKnee>The Right Knee</RightKnee> <Heart>The Heart</Heart> <Extension id="extid"> <ANewLimb>Some new Limb</ANewLimb> </Extension> <AnotherNewLimb>Another New Limb</AnotherNewLimb> </Torso> </Body> </SeeThreePO> Which makes sense to me, but its not what I want. Any ideas? -Brent XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|