Need help with XML/XSL - The WWW

Users browsing this thread: 1 Guest(s)
crshd
Registered
There are a couple of problems I noticed. First of all, you're not including the stylesheet correctly.

Code:
<?xml-stylesheet href="data.xsl" style="text/xsl"?>
should be
Code:
<?xml-stylesheet href="data.xsl" type="text/xsl"?>

then it will get loaded. After that, I had a problem with incorrect formatting of the stylesheet itself. You left out some ?

Code:
<xml version="1.0" encoding="ISO-8859-1">
should be
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

Then it'll work.


Regarding the usage of XML, it's just a personal thing. I absolutely hate it, because it's a pain to type with all the opening and closing tags. And it's a bitch to parse as well, unless you want to use some pre-build libs, which may have some insane deps. I prefer something "light" like JSON, which does a similar thing without all the tags.

But as I said, it's a matter of personal preference.

Of course, there are some nice things about it. The fact that you can format and display your data in any browser without having to further process it into HTML or something is pretty nice, if that's what you're after.

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCA/IT d-(---)@ s+: a-- C+++(++++)$ UBL*+++ P+++>++++ L++ E W+++$ !N !o K !w !O M+>++ !V PS+++ PE !Y PGP+ !t-- !5 !X R@ tv- b+ DI D+ G e h r++ y+
------END GEEK CODE BLOCK------



Messages In This Thread
Need help with XML/XSL - by vompatti - 27-12-2013, 07:45 PM
RE: Need help with XML/XSL - by crshd - 27-12-2013, 09:56 PM
RE: Need help with XML/XSL - by vompatti - 27-12-2013, 10:49 PM
RE: Need help with XML/XSL - by crshd - 27-12-2013, 11:37 PM
RE: Need help with XML/XSL - by vompatti - 28-12-2013, 12:02 PM