anNS="http://rdf.desire.org/vocab/recommend.rdf#"
rdfNS="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
ImgNS="http://jibbering.com/2002/3/svg/#"
DCNS="http://purl.org/dc/elements/1.1/"
foafNS="http://xmlns.com/foaf/0.1/"
wordnetNS="http://xmlns.com/wordnet/1.6/"
svgrNS="http://www.w3.org/2001/svgRdf/axsvg-schema.rdf#"
svgNS="http://www.w3.org/2000/svg"
myRDF=new RDF()
SVGDoc=null
Talk=[]
function init(evt) {
try {
parent.document.body.insertAdjacentHTML('afterEnd','')
} catch (e) {
alert("Please use Internet Explorer on windows...")
}
try {
if (typeof window.getSVGViewerVersion!='function' || window.getSVGViewerVersion()<3) { alert('Your ASV version is too old, version 3 is required.') }
if (parent.speech.countEngines==0) alert("Please install a TTS engine http://download.microsoft.com/download/speechSDK/Install/4.0a/WIN98/EN-US/SAPI4SDKSUITE.exe")
} catch (e) {
alert("No Text To Speech Plugin detected, please download http://download.microsoft.com/download/speechSDK/Install/4.0a/WIN98/EN-US/spchapi.EXE")
}
myRDF.getRDFURL('/rdf/example.rdf',fn)
SVGDoc=evt.getTarget().getOwnerDocument()
}
function fn() {
url=myRDF.getSingleObject(null,null,anNS+'annotates',null)
title=myRDF.getSingleObject(null,url,DCNS+'title',null)
desc=myRDF.getSingleObject(null,url,DCNS+'description',null)
height=myRDF.getSingleObject(null,url,ImgNS+'height',null)
width=myRDF.getSingleObject(null,url,ImgNS+'width',null)
var str=''
var nde=parseXML(str,SVGDoc)
path=nde.firstChild.lastChild
SVGDoc.firstChild.appendChild(nde)
str="The image '"+title+"', can be described as '"+desc+"'"
Talk.push(str)
tb = new TextboxOutput(10,(+height)+20, "300", "500", SVGDoc.firstChild);
str=str.split(' ')
for (i=0;i'
var nde=parseXML(str,SVGDoc)
path=nde.firstChild.lastChild
SVGDoc.firstChild.appendChild(nde)
j=path.getBBox()
path.parentNode.setAttribute("transform","translate("+((-j.x)+x)+', '+((-j.y)+y)+")")
SVGDoc.firstChild.appendChild(nde)
GR++
return j.height
}
function Talking() {
try {
parent.speech.Speak(Talk.join('\n \n \n'))
} catch (e) {}
}