Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

filling a table from xml - image link with alt tag

0 views
Skip to first unread message

Tim Blanchard

unread,
Aug 19, 2002, 12:44:37 PM8/19/02
to
Hi people,

I want to generate a table, filling it from data from an xml file. In
the table will be some thumbnail images, set as links to pages with
the full sized images. I want to put unique alt tags on each
thumbnail, but have had no success so far. How can I do that?


The table looks like this:

xml id = "carlist" src="cartest.xml"></xml>

<table border="1" datasrc="#carlist">
<tr>
<td> <span datafld = "make" > </span> </td>
<td> <span datafld = "model"> </span></td>
<td> <span datafld = "status" ></span></td>
<td> <a href datafld="picture"><img datafld ="thumbnail" alt
datafld = "alttext"></a></td>
</tr>
</table>

-----

('<img datafld ="thumbnail" alt datafld = "alttext">' is the
problem line, I think)
----

the xml looks like this:

<?xml version="1.0"?>
<musclecars>
<car>
<make>Plymouth</make>
<model>Barracuda </model>
<thumbnail>thumb_cuda.jpg</thumbnail>
<alttext>SomeText1</alttext>
<picture>cuda.jpg</picture>
<id tag = "1"/><status>sold</status>
</car>
<car>
<make>Dodge</make>
<model>Swinger </model>
<thumbnail>thumb_dart.jpg</thumbnail>
<picture>dart.jpg</picture>
<alttext>SomeText2</alttext>
<id tag = "2"/><status>sold</status>
</car>
</musclecars>

Nicolás Lichtmaier

unread,
Aug 19, 2002, 4:10:14 PM8/19/02
to

> I want to generate a table, filling it from data from an xml file. In
> the table will be some thumbnail images, set as links to pages with
> the full sized images. I want to put unique alt tags on each
> thumbnail, but have had no success so far. How can I do that?
>
>
> The table looks like this:

This is neither HTML nor XML, you should probably try asking on a
Microsoft specific newsgroup.

Tim Blanchard

unread,
Aug 21, 2002, 4:53:41 PM8/21/02
to

"Nicolás Lichtmaier" <ni...@technisys.com.ar> wrote in message
news:ajrjb6$1ca81f$1...@ID-144930.news.dfncis.de...

After doing a bit of research, I've found out that the datasrc and
datafld tags are MS IE only, so perhaps if there were a related MS
newsgroup ( I have not yet found one), I could ask there. However, I
don't really see how you could say my snippets are neither HTML nor
XML. Would you please clarify?


Nicolás Lichtmaier

unread,
Aug 21, 2002, 9:10:38 PM8/21/02
to

>>>The table looks like this:
>>This is neither HTML nor XML, you should probably try asking on a
>>Microsoft specific newsgroup.
> After doing a bit of research, I've found out that the datasrc and
> datafld tags are MS IE only,

As most IE-only things, not only MS IE, but also Windows MS IE (Mac IE
doesn't support these Explorer non-standard things).

> so perhaps if there were a related MS
> newsgroup ( I have not yet found one), I could ask there. However, I
> don't really see how you could say my snippets are neither HTML nor
> XML. Would you please clarify?

Sure... those attributes are not in HTML, and data islands themselves
are a monstruosity which are neither XML nor HTML.

BTW, there are cleaner (and standard) ways to integrate XML with HTML,
as XSLT and JavaScripts's "document.load".

Tim Blanchard

unread,
Aug 21, 2002, 9:38:28 PM8/21/02
to

"Nicolás Lichtmaier" <ni...@technisys.com.ar> wrote in message
news:ak1dmi$1eqajv$1...@ID-144930.news.dfncis.de...

> BTW, there are cleaner (and standard) ways to integrate XML with
HTML,
> as XSLT and JavaScripts's "document.load".

Thanks for the reply. I'll look into those.

0 new messages