[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] moving an element and then converting it to an attribute


Subject: [xsl] moving an element and then converting it to an attribute
From: Jonina Dames <jdames@xxxxxxxxx>
Date: Wed, 15 Aug 2012 14:13:20 -0400

Hi, I'm pretty new to XSLT and I'm having some trouble with a project.

I have the following XML:

<media.block id="fun1">
<caption>
<para>
<txt>
<image-size>
                                spread
</image-size>
</txt>
</para>
</caption>
<media filename="1234567"/>
</media.block>

What I want is to turn the image-size node into an attribute of the media element, so it looks like this:

<media.block id="fun1">
<caption>
<para>
<txt>
<image-size>
                                spread
</image-size>
</txt>
</para>
</caption>
<media filename="0801_75750-rm" image-size="spread"/>
</media.block>

But I keep getting stuck. I was thinking I might need to move the image-size node somewhere before I could turn it into an attribute of the media element? Can anyone help me with this? I'm just using version 1, not 2.

Thanks,
Joni

--
Jonina Dames
Customer Support Specialist
Inera Inc.
+1 617 932 1932
jdames@xxxxxxxxx

-------------------------------------------------------------------
This email message and any attachments are confidential. If you are not the intended recipient, please immediately reply to the sender or call 617-932-1932 and delete the message from your email system. Thank you.
-------------------------------------------------------------------


Current Thread
Keywords