Hi
I am trying to write an XML stylesheet and I need a bit of help. I have an XML document which contains,
<img src="currentLocation/myPicture.gif">
I want to change to change the attributes of all these elements to
<img src="BlackboardLocation/myPicture.gif">
To do this, I have a Java class which takes in an XML document and an XSL stylesheet, but I don't know how to write the XSLT to do what I want. First, can I write something like this to find each img element?
What I want to know is whether I can use XSL to pick out individual elements, change their values and then write back the new values without disturbing the rest of the document? Or do I need to get all of the elements, change the attribute values of the img element, and then write all of the elements back to the document?
Hopefully this is clear, but probably it is not!
Tony
I am trying to write an XML stylesheet and I need a bit of help. I have an XML document which contains,
<img src="currentLocation/myPicture.gif">
I want to change to change the attributes of all these elements to
<img src="BlackboardLocation/myPicture.gif">
To do this, I have a Java class which takes in an XML document and an XSL stylesheet, but I don't know how to write the XSLT to do what I want. First, can I write something like this to find each img element?
What I want to know is whether I can use XSL to pick out individual elements, change their values and then write back the new values without disturbing the rest of the document? Or do I need to get all of the elements, change the attribute values of the img element, and then write all of the elements back to the document?
Hopefully this is clear, but probably it is not!
Tony