LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
[stats]
From: Andrew Reid <andrew.reid@plug.cx>
To : <linuxsa@linuxsa.org.au>
Date: Fri, 31 May 2002 13:06:32 +0930
XSLT Parsing with Sablotron from PHP
Although I'd vowed never to write another line of PHP ever again[1],
it would seem that I've got myself involved in a project that involves
lots of coding in PHP.
Here's what I've got happening so far.
* XML file generated by a PHP script which pulls the data from the
database.
* XSL file written by hand to parse the dynamically generated XML.
* Both the XML and XSL files are parsed happily in the included XML
parser in IE6[2].
You'd go to a URL, passing a username as an argument to the PHP
script, which'd then go and fetch the XML and apply the XSL template
to it and print out the results. All should be happy and I'd be left
with some nicely formatted data.
However, while IE seems to think that my XSL is perfectly sane (and
I'd have to say that I do too -- I've gone over it with a fine-toothed
comb), but Sablotron tells me there is an error:
"Warning: Sablotron error on line 144: XML parser error 4: not
well-formed in /usr/local/www/gihsnet/shp/index.php on line 24"
... which means that it's not happy with the XSL that I'm feeding
it. The (XSL) file only has 143 lines, making it sound like one of
those "you didn't close a bracket, moron" type of errors.
However, (as I've said), I've gone over it with a fine-toothed comb,
and I can't find anything wrong with it. IE doesn't complain about it
(and it *did* complain when there were errors there), but Sablotron
does, leading me to believe that Microsoft and Ginger Alliance have
different interpretations of what well-formed XML is.
The XML[3], XSL[4], PHP parser[5] and it's source[6] are all available
for comment.
If there are any XML/XSL/Sablotron gurus out there that might be able
to offer some advice to me, I'd be most greatful if they'd speak up!
Thanks in advance for your help,
- andrew
[1] Euck. Such a mucky language.
[2] Not that I like IE or anything, s'just that I'm using it to check
out the sanity of my XML/XSL.
[3] http://gihsnet.gihs.sa.edu.au/shp/xml/?username=andrew
[4] http://gihsnet.gihs.sa.edu.au/shp/xml/staff.xsl
[5] http://gihsnet.gihs.sa.edu.au/shp/?username=andrew
[6] http://gihsnet.gihs.sa.edu.au/shp/index.phps
--
| Andrew Reid [mailto:andrew.reid@plug.cx]
| Network Wrangler, Bit Herder
| C: +61-401-946-813 F: +61-8-8379-1093
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
[stats]
Return to the LinuxSA Mailing List Information Page