|
-
Dec 7th, 2003, 01:07 PM
#1
Thread Starter
Hyperactive Member
xml--data layout in table
newb to xml....
I have an XML file, and I have a web page....(great start huh?)
I want the data to display as follows:
Data 1 | Data 2 | Data 3 | Data 4
but all I can make work is:
Data 1
Data 2
Data 3
If I try anything else, I get:
Data 1 | Data 1 | Data 1 |Data 1
Help?
Talk does not cook rice.
-Chinese Proverb
-
Dec 7th, 2003, 04:44 PM
#2
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 7th, 2003, 06:07 PM
#3
Thread Starter
Hyperactive Member
Code example as follows:
Code:
<html>
<body>
<xml id="cdcat" src="cd_catalog.xml"></xml>
<table border="1" datasrc="#cdcat">
<tr>
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
</tr>
</table>
</body>
</html>
If I try
Code:
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
Then I get the same ARTIST and the same TITLE on the same row.
I actually want ARTIST 1, TITLE 1, then ARTIST 2, TITLE 2 on row one....then ARTIST 3, TITLE 3, ARTIST 4, TITLE 4 on the next...so on and so on....
Talk does not cook rice.
-Chinese Proverb
-
Dec 8th, 2003, 04:42 AM
#4
Who processes this file? What does the XML file look like?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 8th, 2003, 08:53 AM
#5
Thread Starter
Hyperactive Member
here is the XML...
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<CATALOG>
<Group>
<Artist>Bob</Artist>
<Title>Bobs Album</Title>
</Group>
<Group>
<Artist>Steve</Artist>
<Title>Steves Album</Title>
</Group>
<Group>
<Artist>Fred</Artist>
<Title>Freds Album</Title>
</Group>
<Group>
<Artist>John</Artist>
<Title>Johns Album</Title>
</Group>
</CATALOG>
whatchathink?
Talk does not cook rice.
-Chinese Proverb
-
Dec 8th, 2003, 01:28 PM
#6
I still don't know what program processes your "HTML" file to generate real HTML. I need to know its capabilities for the datafld attribute.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 8th, 2003, 01:38 PM
#7
Thread Starter
Hyperactive Member
ok...so maybe that is my problem...??
I am not sure what you are talking about...
I have the first section of coding in my html page....
and the second set of coding is my XML file....
so obviously I am missing something..??
Talk does not cook rice.
-Chinese Proverb
-
Dec 8th, 2003, 01:47 PM
#8
If I load that HTML you have in a browser, it won't display anything. Maybe IE does in a special mode, but a normal browser doesn't. This means that there must be some program that loads your HTML file, reads it and inserts the data from the XML file. I want to know what program that is and what it is capable of.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 8th, 2003, 02:09 PM
#9
Thread Starter
Hyperactive Member
guess, that is making sense....
since I am using (gulp, I know you hate it)....IE that may be why it is processing in the testing enviroment..
This work is at home and I am at the office, so I cant dig into it more at this point....but thanks for the starting point, of a path I need to check....
Talk does not cook rice.
-Chinese Proverb
-
Dec 15th, 2003, 07:15 PM
#10
Thread Starter
Hyperactive Member
hate to be a pain....
been out of town for awhile...and just getting back to this project...
I am still lost. I went through w3schools tutorial on XML and came back....still confused...
If I take the html presented here, and save it to a htm file. Take the XML presented here, and save it to a XML file (named cd_catalog.xml, in the same directory)....
double click the htm file...I get results (not the layout I want) but I get results....so how do I get you the information you are needing ?
I appreciate your help with this, and want to do it the CORRECT way...but cant seem to understand...
This means that there must be some program that loads your HTML file, reads it and inserts the data from the XML file.
Talk does not cook rice.
-Chinese Proverb
-
Dec 16th, 2003, 06:10 AM
#11
I wouldn't trust a tutorial where the first two sentences are
XML was designed to describe data and focus on what data is.
HTML was designed to display data and focus on how data looks.
Anyway, that's got nothing to do with MS's Data Islands.
I fear that stupid techology is simply too limited to do what you want. Learn XSLT, it's far more complicated, but also far more powerful and a W3C standard.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 16th, 2003, 09:05 AM
#12
Thread Starter
Hyperactive Member
with that advice...is there a tutorial (other than W3schools) that you would suggest for XSLT ?
Talk does not cook rice.
-Chinese Proverb
-
Dec 16th, 2003, 10:41 AM
#13
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 16th, 2003, 10:48 AM
#14
Thread Starter
Hyperactive Member
Thanks!
I will give it a shot....
Talk does not cook rice.
-Chinese Proverb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|