|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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" /> <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:
Why aren't they showing up? |
|
#2
|
||||
|
||||
|
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.
![]() |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
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... ![]() |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
Yep, this can be done with XSLT...
But, still more than XSLT, I prefer to use PHP... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML DataIslands not showing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|