yysun's space

Archive for May 2007

No needs to rename every control from something like textBox1 to txtTitle 🙂 , because no more code like:

txtTitle.Text = article.Title;
article.Title = txtTitle.Text;

How much time can we save if there are 20 controls on the screen?

Google AJAXSLT is an implementation of XSL-T in JavaScript, intended for use in fat web pages, which are nowadays referred to as AJAX applications. Because XSL-T uses XPath, it is also an implementation of XPath that can be used independently of XSL-T.

Selenium Core uses AJAXSLT’s XPath function to locate element on plain html. Selenium IDE can generate the XPath very much same as Solvent.

Here is a sample to extracting data from a web page using XPath using AJAXSLT.

<html><head>
<title>XPath-Test</title>
<
script language=”JavaScript” type=”text/javascript” src=”xpath/misc.js”></script>
<
script language=”JavaScript” type=”text/javascript” src=”xpath/dom.js”></script>
<
script language=”JavaScript” type=”text/javascript” src=”xpath/xpath.js”></script>
<
script language=”JavaScript” type=”text/javascript”>
function
findElementUsingFullXPath(xpath, inDocument) {
 
var context = new ExprContext(inDocument);
 
var xpathObj = xpathParse(xpath);
 
var xpathResult = xpathObj.evaluate(context);
 
if (xpathResult && xpathResult.value) {
    return xpathResult.value[0];
  }
  return null;
};
function start() {
  alert(findElementUsingFullXPath(
“//*[.=’b’]”, window.document).innerHTML);
}
</script>
</
head>
<
body onload=”start()”>
<
div><p>aaaaa</p>test<div>bb</div><a>b</a></div>
</
body>
</
html>

 

One of the Mix07 presentation mentioned VBx along the Ruby and Python. I realized immediately it must be something interesting.

While searching related staff, I also found this diagram.  

Most popular blog servers/engines such as WordPress, Drupal, Neclues and etc. are using RDS (Really Simple Discovery) to help client software like WB Editor to find the services that can be used to retrieve, modified and delete the blog posts.

Those blog servers/engines are also generating RDF (Resource Description Framework) for each blog post to give more information about the post, e.g. track back url. But not enough. I am looking for,

  • RDF extension that describes the blog service API lisk WSDL dose for SOAP, so that WB Editor can generate dynamically proxies to the service.
  • RDF extension that describes which HTML elements can WB Editor extract data from and then send to the blog service.

Here are some interesting references:



    • Pk: The horizontal view is a pleasure to use! Good thinking
    • randyburden: A valiant and commendable effort. Your use of Tuple is a little weird but it offers a feature that most other microORMs don't. Your use of a static Gu
    • reav: great work done on Rabbit Framework. just started to learning it, and by now i think it will solve all my problems and questions, that i had in webpag

    Categories