468,140 Members | 1,643 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

Opera -- displaying images in XML documents

I asked this in two of the Opera newsgroups, but except for one person
who advised me to just use namespaced HTML elements in my XML, there
were no replies. Has anybody here successfully used Opera's CSS
extension "-o-replace" to display images in generic XML? See below:

---------
Opera has some nice (in theory) CSS extension to enable linking and
embedding in XML ...

http://www.opera.com/docs/specs/#xml-css-link

But the image embedding doesn't work. Take this snippet from a test
TEIlite document ...

....
<p>Here's a link to the <xref
url="EPU.http://emblems.let.uu.nl/emblems/html/">EPU</xref>.</p>

<p>Here's a picture: <figure
url="http://emblems.let.uu.nl/emblems/html/navicon/rd-small.gif"/></p>
....
With this CSS applied ...

....
p {
display: block;
}

xref { /* this works! */
-o-link: attr(url);
-o-link-source: current;
color: blue;
text-decoration: underline;
}

figure { /* this fails! */
-o-replace: attr(url);
}
....
The linking element (<xref>) works fine, but the image embedding
(<figure>) doesn't. What's wrong with "-o-replace"? I even tried
"content"[1] instead of "-o-replace", but it didn't work either.

I'm using Opera 7.54. Did -o-replace stop working somewhere along the
line, or am I using it incorrectly? What it does now is display the
actual URL string on the page, instead of the image that URL is
supposed to be pointing to. Does anybody here have images successfully
displaying in generic (non-XHTML) XML documents?

Thanks,
[1]: http://people.opera.com/howcome/2000...ink-nov-6.html
/Jelks
Jul 21 '05 #1
5 2864


Jelks Cabaniss wrote:

Opera has some nice (in theory) CSS extension to enable linking and
embedding in XML ...

http://www.opera.com/docs/specs/#xml-css-link

But the image embedding doesn't work. Take this snippet from a test
TEIlite document ...
<p>Here's a picture: <figure
url="http://emblems.let.uu.nl/emblems/html/navicon/rd-small.gif"/></p> figure { /* this fails! */
-o-replace: attr(url);
}
...
The linking element (<xref>) works fine, but the image embedding
(<figure>) doesn't. What's wrong with "-o-replace"? I even tried
"content"[1] instead of "-o-replace", but it didn't work either.

I'm using Opera 7.54. Did -o-replace stop working somewhere along the
line, or am I using it incorrectly?


I have run some tests with different Opera 7 versions on Windows XP and
7.11 displays the image referenced, later version I have tested (7.20,
7.50, 8.00 Beta) do not display the image but the attribute value instead.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 21 '05 #2
Martin Honnen wrote:
figure { /* this fails! */
-o-replace: attr(url);
} I'm using Opera 7.54. Did -o-replace stop working somewhere along
the line, or am I using it incorrectly?
I have run some tests with different Opera 7 versions on Windows XP
and 7.11 displays the image referenced, later version I have tested
(7.20, 7.50, 8.00 Beta) do not display the image but the attribute
value instead.


Thanks for confirming this, Martin.

Interestingly, nobody in the Opera newsgroups ever replied about this,
nor has their documentation at

http://www.opera.com/docs/specs/#xml-css-link

ever been updated to show this. It would be nice to have had
consistancy in the 7.x series, or at least some post-7.11 documentation
as to why the behavior of -o-replace had been changed.
/Jelks
Jul 21 '05 #3
*Jelks Cabaniss*:

xref { /* this works! */
-o-link: attr(url);
-o-link-source: current;
}

figure { /* this fails! */
-o-replace: attr(url);
}


Have you tried

-o-replace: url(attr("url"));

or

-o-replace: attr("url", url);?

--
"Censorship, like charity, should begin at home;
but, unlike charity, it should end there."

Clare Booth Luce
Jul 21 '05 #4
Christoph Paeper wrote:
Have you tried

-o-replace: url(attr("url"));

or

-o-replace: attr("url", url);?


I hadn't before, but I just tried them. Still no picture. In fact,
nothing. Plain attr(url) shows the attribute value (the string), but
quoting "url" -- and as in your second example -- ends up blank.

Is -o-replace working for use in XML documents? If so, what version of
Opera are you using?

Thanks,

/Jelks

Jul 21 '05 #5
I wrote (too quickly):
Is -o-replace working for use in XML documents?


Make that "for you", not "for use"...
/Jelks
Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Phong Ho | last post: by
24 posts views Thread by Mark Sargent | last post: by
4 posts views Thread by alainpoint | last post: by
reply views Thread by Fronky | last post: by
8 posts views Thread by Jon Weston | last post: by
2 posts views Thread by Andr Wagner | last post: by
2 posts views Thread by sj | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.