Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linking dynamic HTML tables to XML with DSO

Posted on 2000-02-21
3
Medium Priority
?
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

by:
drom earned 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

609 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