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:
  #1  
Old July 13th, 2004, 11:46 AM
gt500shlby gt500shlby is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: West Point, PA
Posts: 18 gt500shlby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry XML DataIslands not showing

I have an xhtml file with an XML data Island but it's not showing.

html file:
Code:
 
<?xml version="1.0" encoding="utf-8"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	  <head>
		<title>Registrations</title>
	  </head>
	  <body>
		<xml id="results" src="OutPut.xml" />
		<h1>Registrations</h1>
		<br />
		<table datasrc="#results">
		  <thead>
			<tr>
			  <th>Name</th>
			  <th>Location</th>
			  <th>Extension</th>
			  <th>E-Mail</th>
			  <th>Guests</th>
			  <th>Guest Names</th>
			</tr>
		  </thead>
		  <tbody>
			<tr>
			  <td><span datafld="lastname" />,<span datafld="firstname" />&nbsp;<span datafld="middlename" /></td>
			  <td><span datafld="location" /></td>
			  <td><span datafld="phone" /></td>
			  <td><span datafld="email" /></td>
			  <td><span datafld="numguests" /></td>
			  <td><span datafld="guestnames" /></td>
			</tr>
		  </tbody>
		</table>
	  </body>
	</html>


xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<results>
 <person>
  <firstname>Joe</firstname>
  <middlename>A.</middlename>
  <lastname>Schmoe</lastname>
  <location>Horsham</location>
  <numguests>4</numguests>
  <guestnames>Eenie, Meenie, Miney, Moe</guestnames>
  <email>foo@bar.com</email>
  <phone>12345</phone>
 </person>
 <person>
  <firstname>Frank</firstname>
  <middlename></middlename>
  <lastname>Zappa</lastname>
  <location>Tijuana</location>
  <numguests>2</numguests>
  <guestnames>Dweezil, Moonflower</guestnames>
  <email>ILove@cocaine.org</email>
  <phone>23456</phone>
 </person>
 <security>
  <logtime>Tue Jul 13 15:00:01 2004</logtime>
  <ipaddy>127.0.0.1</ipaddy>
 </security>
</results>


All I get though is:
Quote:
Registrations

Name Location Extension E-Mail Guests Guest Names
,

Why aren't they showing up?

Reply With Quote
  #2  
Old July 14th, 2004, 07:20 AM
Miska's Avatar
Miska Miska is offline
Madden Maniac
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2001
Location: Finland
Posts: 519 Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 8
Is there a reason why you are using just pure XHTML instead of using the actual "language" for doing XML -> (x)HTML transformations. That being XSLT.


Reply With Quote
  #3  
Old July 14th, 2004, 07:53 AM
gt500shlby gt500shlby is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: West Point, PA
Posts: 18 gt500shlby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I like the .html extension You are correct though, I should be using xslt. But my xml file is on a seperate server, and I do not wish to access it directly. With xsl & xslt you are trapped to accesing the xml file for the formatted output instead of just drawing the data from it. I'd rather have an intermediate file. Unless I am misunderstanding XSLT, at least my theories are founded for XSL.

I've been missing something, with all of my web devel, not warranting JSP I still need a dynamic 'engine'. Maybe I should take a second look into PHP.

I got this page working however, I split the <security> to another xml file and mosified the xml generators. It seems data islands can't draw from more than a single set. Crappy limitation if you ask me.

Reply With Quote
  #4  
Old July 14th, 2004, 08:01 AM
Miska's Avatar
Miska Miska is offline
Madden Maniac
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2001
Location: Finland
Posts: 519 Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 8
I can "warmly" recommend PHP, since I've been using it for 3 years now to lots of different tasks.

I'm not sure what you are after with this "trapped to accessing the xml file", cos atleast in XSLT the transformation is done separately from the xml file as the XSL draws the data from XML. So that you can different outputs for different browsers for example. Dunno if this what you are after but...


Reply With Quote
  #5  
Old July 14th, 2004, 08:07 AM
gt500shlby gt500shlby is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: West Point, PA
Posts: 18 gt500shlby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well... I wan't to be able to have my xml data in one directory, my styling in another and see a truly dynamic page with all the bells and whistles.
I want a page that someone looks at and goes.. "wow, they used the epitome of K.I.S.S meets bleeding edge tech."

I'm gonna do some reading, I'll post an example when I make one.

Reply With Quote
  #6  
Old July 14th, 2004, 08:09 AM
Miska's Avatar
Miska Miska is offline
Madden Maniac
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2001
Location: Finland
Posts: 519 Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 8
Yep, this can be done with XSLT... But, still more than XSLT, I prefer to use PHP...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML DataIslands not showing


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 6 hosted by Hostway
Stay green...Green IT