Solved

Linking dynamic HTML tables to XML with DSO

Posted on 2000-02-21
3
313 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 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

Technology Partners: 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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

691 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