Solved

Linking dynamic HTML tables to XML with DSO

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Trouble parsing soap xml result 3 50
MS SQL Database Generating XML using query 21 44
XML & .net 5 47
tutorial for ebay api 3 34
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…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 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