Popular links

Topic maps

xSiteable

Claudio Monteverdi

Alexander Johannesen

Technologies used
topic map logo
xSiteable logo
Wed, 16 June 2004 13:00:00 GMT

Notice! This blog is no longer updated as such, and the new spot to point your feedreaders and blurry eyes are https://shelter.nu/blog/

This also means no more comments here, and especially not you spammers, you filthy floatsam of the internet!

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.