XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
John StubbeSubject: Newbie - dublicating attribute in several image tags
Author: John Stubbe
Date: 07 Aug 2006 10:15 AM
Dear XSLT experts

I have an issue regarding adding an extra attribute under a transformation.

I have an entry in my source XML file that consists of content from a WYSIWYG editor. I need to duplicate an attribute to all image tags which has been inserted.

My source XML file looks something like below:

<root>
<content>
This is some text <b>bold</b>
<img src="picture.jpg" img-id="picture.jpg" />
<br />
Some more text and images
<img src="picture2.jpg" img-id="picture2.jpg" />
</content>
</root>


When I do an XSL transformation I need to create a HTML page with the content from the “content” node but to each img tag the result should look something like this (an ekstra attribute “usemap” is added which is a copy of the img-id:
<img src="picture.jpg" img-id="picture.jpg" usemap=”picture.jpg” />

How is this possible ?

Thanks in advance

Cheers
John Stubbe
Denmark

Posttop
Ivan PedruzziSubject: Newbie - dublicating attribute in several image tags
Author: Ivan Pedruzzi
Date: 07 Aug 2006 12:46 PM
Hi John,

Which Stylus Studio version are you running?

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.