MOBY

 view release on metacpan or  search on metacpan

share/cgi/AgentRDFValidator  view on Meta::CPAN

       font-size: 12pt;
       font-weight: normal;
       margin-top: 10px;
       margin-right: 1em;
       margin-bottom: 1em;
       margin-left: 1em;
       background-position: left top;
       background-repeat: no-repeat;
     }

h1 { border: solid; 
     text-align:center;
     background-color:yellow;
     color: navy;
   }
h2 { border: ridge;
     padding: 5px;
     background-color:yellow;
     color: navy;
   }
h3 { border: none;
     padding: 5px;
     background-color:yellow;
     color: navy;
   }
iframe {
	width:95%;
	frameborder:0;
	height:70%;
	scrolling:auto;
	}
</style>
<title>RDF Agent Test Page</title>
</head>
<body>
<script>
<!--
if( !window.XMLHttpRequest ) XMLHttpRequest = function(){
        try{ return new ActiveXObject("MSXML3.XMLHTTP") }catch(e){}
        try{ return new ActiveXObject("MSXML2.XMLHTTP.3.0") }catch(e){}
        try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
        try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
        throw new Error("Could not find an XMLHttpRequest alternative.")
};

function modular_waiting(vis, msg, options) {
// Pass true to show the dialogue screen, false to hide
var options   = options || {};
var zindex   = options.zindex || 1000;
var height   = options.height || 25;
var width   = options.width || 35;
var opacity   = options.opacity || 90;
var opaque   = (opacity / 100);
var bgcolor   = options.bgcolor || '#FFDC75';
var fColor   = options.fontcolor || '#0000FF';
var fWeight  = options.fontweight || 600;
var bcolor   = options.bordercolor || 'black';
var bstyle  = options.borderstyle || 'solid'
var bwidth  = options.borderweight || '3px'
var align   = options.align || 'center';
var __div_id__ = options.name ||  '__modular__popup__';

var dark= null;
if (document.getElementById(__div_id__ )) {
dark = document.getElementById(__div_id__ )
}

if (!dark) {
var tbody = document.getElementsByTagName("body")[0];
var tnode = document.createElement('div');       // Create the layer.
tnode.style.position='fixed';                 	 // Position absolutely
tnode.style.overflow='auto';
tnode.style.display='none';                      // Start out Hidden
tnode.id=__div_id__ ;                    	 // Name it so we can find it later
tbody.appendChild(tnode);                        // Add it to the web page
dark=document.getElementById(__div_id__ );       // Get the object.
}

if (vis) {
var txt = document.createElement('font')
txt.setAttribute('color',fColor);
txt.style.fontWeight = fWeight;
txt.innerHTML = msg

dark.style.border = bwidth + " " + bstyle + " " + bcolor;
dark.setAttribute('align',align);
dark.style.opacity=opaque;    
dark.style.MozOpacity=opaque; 
dark.style.filter='alpha(opacity='+opacity+')';
dark.style.zIndex=zindex;
dark.style.backgroundColor=bgcolor;
dark.style.width= width+'%';
dark.style.height= height+ '%';
dark.style.display='block';
dark.style.cursor = 'wait';
dark.appendChild(txt);
dark.style.left =  '40%'
dark.style.top  =  '50%'
} else {
// TODO - should i remove the element?
dark.style.display='none';
dark.innerHTML = "";
}
}

function testAgent(value)
{
if (value && value.replace(/ /g, "") != "") {
	document.getElementById('output_div').style.visibility = 'visible';
	// call agent via ajax and insert text here
	call_agent(location.href + "?url=" + value, value)
}else{
	alert('please enter a valid url!')
}
return false;
}
var request = null;
function call_agent(url, signatureURL){
		if (!request) {
			request = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP.3.0");
		} else {

share/cgi/AgentRDFValidator  view on Meta::CPAN

                                }
                                var node = document.createElement( "pre" );
								node.innerText = request.responseText;
                                document.getElementById('output').appendChild( node );
                            } else if (document.getElementById("output").textContent != null) {
                            	// opera, firefox
                            	if (document.getElementById("description_span")) {
                            		document.getElementById('description_span').textContent = 'Results for: ' + signatureURL
                            	}
                                document.getElementById('output').textContent = request.responseText
                            } else {
                            	// ie7
                            	if (document.getElementById("description_span")) {
                            		document.getElementById('description_span').outerText = 'Results for: ' + signatureURL
                            	}
                                var node = document.createElement( "pre" );
                                node.innerText = request.responseText;
                                document.getElementById('output').appendChild( node );
                            }
						}
						if (document.getElementById("__submit__")) {
                        	document.getElementById("__submit__").disabled = false;
                        }
						modular_waiting(false)
                } else if (request.readyState == 4 && request.status != 200) {
                	 modular_waiting(false)
                	 if (document.getElementById("__submit__")) {
                     	document.getElementById("__submit__").disabled = false;
                     }
                }
        };
        request.send(null);
}

function doNothing() { return false; }
//-->
</script>
<h1>RDF Agent Test Page</h1>
<p>
<pre> Please enter the url to your RDF document that describes
one or more moby services. The agent will then attempt to
resolve and parse that url.

Once the agent is complete, you should see what services were
considered valid and what errors occurred below.
</pre> 
</p>
<form name="url" onsubmit="return testAgent(document.url.url.value);" method="get" action="" >
  Enter your URL to an RDF here:
  <input name="url" tabindex="1" size="70" type="text" />
  <br />
  <input tabindex="2" name=".submit" id="__submit__" onclick="testAgent(document.url.url.value)" type="button" value="Call the agent" />
  <div></div>
</form>

<div style='visibility:hidden;' id='output_div'>
	<span id='description_span'></span><p></p>
	<pre id='output'></pre>
</div>
<div align="center" style="border: 3px solid black; overflow: auto; position: fixed; display: none; opacity: 0.9; z-index: 10000; background-color: rgb(255, 220, 117); width: 35%; height: 25%; cursor: wait; left: 40%; top: 50%;" 
id="__modular__popup__"/>
</body>
</html>
</div>
</form>
</body>
</html>
EOF

}



( run in 0.756 second using v1.01-cache-2.11-cpan-364913b4093 )