Solved

Linking dynamic HTML tables to XML with DSO

Posted on 2000-02-21
3
271 Views
Last Modified: 2008-02-01
This has been bugging me all day...

I have the following embedded XML layout:

<XML ID="UsageReport">
   <Report>
      <Line>
         <User>person1</User>
         <Size>342</size>
      </Line>
      <Line>
         <User>person2</User>
         <Size>133</size>
      </Line>
   </Report>
</XML>

This works JUST FINE when I make a table like this:

<table datasrc="#UsageReport">
   <tr>
      <td><span datafld="User"></span></td>
      <td><span datafld="Size"></span></td>
   </tr>
</table>

The problem arises if I try to add a "header" section to the report, like this:

<XML ID="UsageReport">
   <ReportHeader>
      <ReportTitle>Usage Summary</ReportTitle>
   </ReportHeader>
   <Report>
   .
   .
   .
   </Report>
</XML>

In this layout, I can't seem to get to the data. I am guessing it has something to do with the data island structure, but I haven't read ANYTHING that says you can't have the layout like this. Unfortunately, the only examples I can find are either really simple, or obscenely complicated. Also, most of the examples were written for IE4 with the Java DSO stuff. I don't want to have to do a bunch of scripting just to lay out a simple little DHTML table.

I have tried messing with the DATAFLD attribute of the table, but I just can't seem to dig into the data if the Report element has any sibling-level elements (<ReportHeader> in the above example). Does anyone know of a simple (DHTML-only based) solution, or does the DSO linked data have to be linked by an element that has no sibling-level elements?

Thanks very much!

Donald
0
Comment
Question by:bytesmythe
  • 2
3 Comments
 

Author Comment

by:bytesmythe
ID: 2556360
Adjusted points to 100
0
 
LVL 1

Accepted Solution

by:
drom earned 100 total points
ID: 2590590
Hi, Donald.

you can't have sibling of root element in data island just like in xml-file. but you may workaround writing script for more complex island structure or adding extra <xml> for header/footer data:

--------------------------------------
<XML ID="usagereportheader">
<reportheader>
 <reporttitle>Usage Summary</reporttitle>
</reportheader>
</XML>

<XML ID="usagereport">
<reports>
<report>
 <user>user-1</user>
 <line>line-1</line>
</report>
<report>
 <user>user-2</user>
 <line>line-2</line>
</report>
</reports>
</XML>

<span datasrc="#usagereportheader" datafld=reporttitle></span>
<table datasrc="#usagereport">
<tr>
 <td><span datafld=user></span></td>
 <td><span datafld=line></span></td>
</tr>
</table>
--------------------------------------
Regards, Dmitry
0
 

Author Comment

by:bytesmythe
ID: 2596388
Thanks very much! I had read a number of documents about the data islands, but never saw anything that said they couldn't have siblings at the root level. I knew it wasn't working, but didn't know if that was the real reason or if I was just doing something wrong. :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now