Breadcrumbs ... deevloping the javascript RDF tabulator code
Coming forom python (and before that Objective C and C) the strageest thing was the iterations over arrays which don't in fact gve the array elements but their indexes
- Safari bug:
when you read the innerHTML of an element, it is a mixed content, but the < in the text are not escaped. You therefore can't read it and write it back again. This bug does not existin Firefox. Javascript weirdnesses: for (x in myArray) does not make x iterate through the members of myArray, but through the indeces! It is the same as (more or less) fot x in range(len((myArray)) in pythonm, not for x in myArray.
i had to work offline when deevloping. The XMLHTTP method is just that -- it gets XML using HTTP. So running in file: space was not possible my mapping URIs.
$ cd /Library/Webserver/Documents $ ln -s /devel/WWW/2000 2000 $ ln -s /devel/WWW/2001 2001 $ ln -s /devel/WWW/2002 2002 $ ln -s /devel/WWW/2003 2003 $ ln -s /devel/WWW/2004 2004 $ ln -s /devel/WWW/2006 2006
And in the script, I put a URI mapper which wirks when the document.domain is 'localhost'. SiteMap[ "http://www.w3.org/" ] =
"http://localhost/www.w3.org/" // Salt to taste
The server does need security: not good to give access to all the filesystem
Notes on local apache server Need mod_rewrite.c # Try this: LoadModule rewrite_module libexec/httpd/mod_rewrite.so AddModule mod_rewrite.c# Authentication - local access only to this server RewriteEngine on RewriteRule ^/$ /devel/WWW/ <Directory /devel/WWW/> Order Deny,Allow Deny from all Allow from localhost </Directory>
- Using the RDF API to test it out
-