Click to See Complete Forum and Search --> : Newb Question


Jester
01-12-2009, 11:32 AM
Hey group,

Just starting to get in to XML - sorry I'm late for the party ;)

I understand the concepts/syntax, but trying to learn from an example and not quite working out for me.

I want to use a treeview control for a new site, and using the source found from:

http://rollerjm.free.fr/pro/Treeview/Treeview.html

I've then tried to put together the HTML as:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="treeview.xslt"?>
<treeview title="Test Explorer Win">
<folder title="My Documents" img="images/folder.gif" alt="test alt text" code="Folder1" expanded="true">
<leaf title="I hope this works!" code="1" img="images/network.gif"/>
</folder>
</treeview>


But it comes up with a blank page. The syntax appears to be the same as described in:

http://www.w3schools.com/XML/xml_xsl.asp

So what am I doing wrong?

Many thanks!
Jess.

jkmyoung
01-12-2009, 01:12 PM
I think it's the .xslt file that is at fault. There is no base <html> node, or other required nodes to display it as html.

Jester
01-12-2009, 01:45 PM
Ok, I'll give that a try now -- but otherwise I'm on the right track?

Cheers,
Jess.

Jester
01-12-2009, 02:32 PM
Right, I changed the extension of the file which I'm to browse from .html to .xml instead and it seems to be fine...

I would have thought that the extension in this case would be irreverent, and that it would just load the data in the file as it reads it...

Not the case, aye?

Cheers,
Jess.