Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

embed and replace in Xlinks

 
clyde mel
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone just explain the main difference between the embed and replace used in xlinks.Just a bit confused regarding these terms.
 
Anup Batra
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Embed will embed the (say gif) file in that place
<h1> My name</h1>
<img src = “aaa.jpeg/>
<h1>Anup</h1>
then with embed option the o/p will be
My name (aaa.jpeg) Anup
=� inserted at that very location
But replace will replace the entire content of the document and then show the gif file. This is what our browsers do when we click a link
Another option is New, which will open another window to shoe the aaa.jpeg file
Hope this will help u,
Anup Batra
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Chapter 19 of the XML Bible, Second Edition : XLinks

If the value of xlink:show is replace, then when the link is activated (generally by clicking on it, at least in GUI browsers), the target of the link replaces the current document in the same window. This is the default behavior of HTML links.
...
If the value of xlink:show is embed, activating the link inserts the targeted resource into the existing document. Exactly what this means is application dependent. Mostly, it implies that the application should somehow render the linked content and display it as part of the finished document. This is how the IMG, APPLET, and OBJECT elements behave in HTML.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic