Re: annotea server

"Nathan Young" <nyoung@asis.com> wrote in message
news:UOXRTR59786FETMLC8A7411ZSPVR3X.3da4c440@inky...
>
> I've also looked at what you get when you make a request like:
>
>
http://annotest.w3.org/annotations?w3c_annotates=http%3A%2F%2Fncyoung.com
>
> Is there an easy way to get the server to return XML to my browser just
as it
> would to an annotea client?

If you use win32 IE, you can easily write a simple javascript which will
do that (any webpage)

<script>

  var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 function window.onload() {
  var Config=new Object()
  Config.AnnoteaServer="http://annotest.w3.org/annotations"
  Config.AnnoteaUserName="jim@jibbering.com"
  Config.AnnoteaPassword=""
  query=Config.AnnoteaServer+"?w3c_annotates=http://jibbering.com/"

xmlhttp.Open("GET",query,false,Config.AnnoteaUserName,Config.AnnoteaPassw
ord)
  xmlhttp.setRequestHeader("Accept","application/xml")
  xmlhttp.Send()
  xmltxt=xmlhttp.responseText
  document.forms[0][0].value=xmltxt
 }
</script>
<form>
<textarea style="width:500px;height:700px;"></textarea></form>

The same will work in any Mozilla (with xmlhttp object got via
http://jibbering.com/2002/4/httprequest.html , but you won't be able to
query any external sites without hoop jumping the security - IE you can
just set "access data sources across domains" to prompt/allow.

Jim.

Received on Thursday, 10 October 2002 07:04:39 UTC