XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 8th, 2002, 11:26 AM
robert.swift's Avatar
robert.swift robert.swift is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Manchester, UK
Posts: 80 robert.swift User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
IE specific XML not being displayed

i've been working on a solution that is specifically intended for deployment with IE 5+ but i'm stumped on a problem.

i've included some code below. the problem is that i can't see the text within the <suggestions> tags IE is inserting the correct number of table rows when i expand and if i mess with the XML it has an immediate effect when displaying. it's driving me nuts and i'm sure it's something very basic that i'm missing.

any assistance would be greatly appreciated.

robert.

Code:
<html>
<head>

<xml id="ge_info">
<?xml version="1.0" encoding="ISO-8859-1" ?>
  <grammarerrorsummary>
    <generator>Microsoft Word</generator>
    <count>5</count>
    <plural>s</plural>
    <pointer>pointer</pointer>
    <expandicon>[+]</expandicon>
    <expand> Expand list of grammar errors</expand>
    <collapseicon>[-]</collapseicon>
    <collapse> Collapse list of grammar errors</collapse>
  </grammarerrorsummary>
</xml>

<xml id="ge_list">
<?xml version="1.0" encoding="ISO-8859-1" ?>
  <grammarerrorlist>
    <suggestion>Some grammartically incowwect text</suggestion>
    <suggestion>Romanus oh nay go</suggestion>
    <suggestion>I just flumped the exam</suggestion>
    <suggestion>Lets just have some text here</suggestion>
    <suggestion>Three</suggestion>
    <suggestion>Two</suggestion>
    <suggestion>One</suggestion>
  </grammarerrorlist>
</xml>

</head>
<body>

<table border="1">
<thead>
  <th style="text-align: left;">
    <span datasrc="#ge_info" datafld="generator"></span>&nbsp;reported&nbsp;<span datasrc="#ge_info" datafld="count"></span>&nbsp;grammar error<span datasrc="#ge_info" datafld="plural"></span><br />
    <!-- expand/collapse -->
    <span id="expand" style="display: inline;"><span datasrc="#ge_info" datafld="expandicon" style="cursor: pointer;" onclick='document.getElementById("collapse").style.display=""; document.getElementById("expand").style.display="none"; document.getElementById("ge_list_visible").style.display="";'></span><span datasrc="#ge_info" datafld="expand"></span></span>
    <span id="collapse" style="display: none;"><span datasrc="#ge_info" datafld="collapseicon" style="cursor: pointer;" onclick='document.getElementById("collapse").style.display="none"; document.getElementById("expand").style.display=""; document.getElementById("ge_list_visible").style.display="none";'></span><span datasrc="#ge_info" datafld="collapse"></span>
	
  </th>
</thead>
<tr>
  <td>
  <table datasrc="#ge_list" border="1" id="ge_list_visible" style="display: none;">
    <tr>
      <td>
        Your text: [<span datasrc="#ge_list" datafld="suggestion" style="color: blue;"></span>]<br />
      </td>
    </tr>
  </table>
  <td>
</tr>
</table>

</body>
</html>


__________________
Robert.

Reply With Quote
  #2  
Old August 16th, 2002, 11:24 AM
torrent torrent is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: UK
Posts: 59 torrent User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
The reason is that you have multiple <suggestion></suggestion> tags. This appears to be causing confusion when accessing them
though a datasrc/datafld. If you remove them all bar one you will see that it does display the text. I'm not 100% sure
how to get round this without delving into my XML book which is at home (I'm at work). I'll take a look later.

Also, your xml is not well formed. There is a missing </span> on line 43 and the last <td> (work up form the bottom
of the page) should be </td>.
__________________
Torrent
www.ski-info-online.com

...silently carving the soft deep powder...

Reply With Quote
  #3  
Old August 16th, 2002, 12:33 PM
robert.swift's Avatar
robert.swift robert.swift is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Manchester, UK
Posts: 80 robert.swift User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
my XML is not well formed!? my wife will confirm that there has never been anything wrong with my xml

cheers for spotting the missing </span> and missing slash in the </td>, however the multiple suggestions is valid and IE dynamically generates the correct number of rows for the datafld fields, the problem is that IE is generating the rows, but i get nothing between my quare brackets...


Reply With Quote
  #4  
Old August 16th, 2002, 12:51 PM
torrent torrent is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: UK
Posts: 59 torrent User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
I agree it looks valid. It's just that when you remove four of the <suggestion> tags it does display the text. It kind of suggests that it is unable to pinpoint the exact datafld to display. I tried making the <grammarerrorlist> the datafld but this didn't work either.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > IE specific XML not being displayed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway