|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
||||
|
||||
|
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> reported <span datasrc="#ge_info" datafld="count"></span> 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. |
|
#2
|
|||
|
|||
|
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>. ![]() |
|
#3
|
||||
|
||||
|
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... ![]() |
|
#4
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > IE specific XML not being displayed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|