Technologies used
topic map logo
xSiteable logo
Wed, 16 June 2004 13:00:00 GMT
PHP5 Topic Maps engine

After my last installment, I guess you saw this one coming; My experiment with PHP5, XML and Topic Maps did succeed, and I hereby bring you a truly rocky beta of it. Not rocky as in 'unstable pile of crap', but as in 'haven't got time to polish it further'. It works well, and simple testing done on my machine (a 1 point something GHz something ... ) here reads, parses and indexes the famed Opera.xtm file in 0.28 of a second, which could be cached for faster performance. The searching through the whole map for topics of type '#opera' was rather fast; 0.000028 of a second.

Anyways, I'm releasing this in the wild, because it is a quick hack and I don't have time to polish it, but if someone does, please let me know that my hatchling is doing ok, huh? There are three files in total PHP, and whatever XTM file (search around til you find one) you like. You need tm.php, the engine topicmaps.php itself, and a helper template thingy called html.php which you don't really need, but makes the tm.php example look better. :) They're all wrapped up nicely in this handy-dandy ZIP file. Anyways, enjoy. And if I'm peer-presured to do something serious with it, my email address can be found over here.

Permalink (Wed, 16 June 2004 13:00:00 GMT)| Comments (2) | Topic maps
/div>

After my last installment, I guess you saw this one coming; My experiment with PHP5, XML and Topic Maps did succeed, and I hereby bring you a truly rocky beta of it. Not rocky as in 'unstable pile of crap', but as in 'haven't got time to polish it further'. It works well, and simple testing done on my machine (a 1 point something GHz something ... ) here reads, parses and indexes the famed Opera.xtm file in 0.28 of a second, which could be cached for faster performance. The searching through the whole map for topics of type '#opera' was rather fast; 0.000028 of a second.

Anyways, I'm releasing this in the wild, because it is a quick hack and I don't have time to polish it, but if someone does, please let me know that my hatchling is doing ok, huh? There are three files in total PHP, and whatever XTM file (search around til you find one) you like. You need tm.php, the engine topicmaps.php itself, and a helper template thingy called html.php which you don't really need, but makes the tm.php example look better. :) They're all wrapped up nicely in this handy-dandy ZIP file. Anyways, enjoy. And if I'm peer-presured to do something serious with it, my email address can be found over here.

Permalink (Wed, 16 June 2004 13:00:00 GMT)| Comments (2)
Alex ( Thu, Jul 15 2004 )
Well, I'll be duh, but I have found some time to fiddle with it, and lots of features and methods have been added. I'll be using this for something ... one day. :)
Another bigger worry is that the new official release of PHP 5.0.0 does *not* include namespace support, and hence my PHP Topic Maps engine only works in RC2 and RC3. I'm investigating what to do and how.
Alex ( Fri, Jul 23 2004 )
I think I need to clarify what I wrote above, with also the solution that I'll be looking into shortly;
PHP 5.0.0 simpleXML apparently dropped namespace support. This still is not correct; what happened was that the register_ns() method for simpleXML was the way to work with namespaces from RC2 and RC3, but in the official release, the problem of namespaces is left to two other methods:
And through these, you must pick out from the namespace you want. A bit more tedious (even a factor that pushes away from the use of simpleXML with namespaces, such as XTM for Topic Maps) but doable. I'll see about updating my TM engine, and report back.






Wisdom compressed

"Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it."

Flickr goodness!
A photo on Flickr
A photo on Flickr
A photo on Flickr
A photo on Flickr
A photo on Flickr
ShelterIt's photos More of ShelterIt's photos

www.flickr.com
Technorati stuff
My other blog

Please note that the this blog is a low-traffic blog where I only write about things of a given importance, when they are important. For a more fast-paced day-to-day blog, there is my other blog with its RSS feed.

Maintained by
Bloglines recomendation

I use the excelent Bloglines.com web-based blog aggregator as my primary (and only!) blog reader, and here is my public site.