[
Lists Home |
Date Index |
Thread Index
]
Hi Peter,
peter murray-rust wrote:
> Here is a possible example (all the components already exist - this is
> not vapourware).
> 1 I have a client-side robot which downloads chemical compounds in XML
> from PubChem at the National Institutes for Health (US). A typical
> example is caffeine:
> http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=28309&disopt=DisplayXML
>
> 2 I wish to convert this to CML (file://usr/pmr/a123.cml) and have a
> stylesheet http://foo.org/pubchem2cml.xsl with a param name=cmlVersion
> 3 I wish to put the result in a local database
>
Have a look here :
http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/
even if it's not specifically designed to run client-side, it could
> As an example, take only on the second and third steps. I could do
> something like:
> java -jar saxon.jar -o file://usr/pmr/a123.cml
> http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=28309&disopt=DisplayXML
> http://foo.org/pubchem2cml.xsl
> cmlVersion=2.5
> (I am not sure if Saxon resolves URLs but it shows the logic)
>
> However this means I have to know about Saxon, install it, learn its
> commandline, etc. What I would really like would be to get this
> functionality directly from CLAX (which might use Saxon, or Xalan, or
> MSXML or whatever - I don't care.) Assuming we have a CLAX interface
> this might look like:
>
> <clax>
> <claxRequest service="XSLT1.0">
> <arg role="input"
> url="http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=28309&disopt=DisplayXML"/>
>
> <arg role="xsl" url="http://foo.org/pubchem2cml.xsl"/>
> <arg role="param" name="cmlVersion" value="2.5"/>
> </claxRequest>
> <claxResponse url="file://usr/pmr/a123.cml"/>
> </clax>
The XML Control Language does that :
<xcl:transform output="file:///usr/pmr/a123.cml"
source="http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=28309&disopt=DisplayXML"
stylesheet="http://foo.org/pubchem2cml.xsl">
<xcl:param name="cmlVersion" value="2.5"/>
</xcl:transform>
more examples here :
http://reflex.gforge.inria.fr/tutorial.html
and here :
http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/active-tags/active-tags.html#overview
>
> This is a simple request/response API that offers me all the basic XSLT
> functionality I need, without having to install an XSLT processor myself.
>
> In this case, therefore, a CLAX installation should, by default, include
> an XSLT processor and a service honouring the above API. It will take a
> modest amount of work to create it for Saxon in a Java environment. But
> once that is done it requires no further maintenance. It therefore makes
> XSLT available to anyone prepared to install CLAX. The request can even
> be customised for people using click and type if required, perhaps even
> in a br*ws*r.
>
> In more adventurous fashion the data might be stored something like:
> <clax>
> <claxRequest service="XMLStorage">
> <arg role="input" url="file://usr/pmr/a123.cml"/>
> </claxRequest>
> <claxResponse url="file://foo/pubchem.log"/>
> </clax>
this is a simple I/O copy :
<io:copy source="file:///usr/pmr/a123.cml"
target="xmldb:provider://user:password@host:port/collection/path/to/a123.cml"
>
>
> Here XMLStorage might be configured to provide access to an XMLDatabase
> such as eXist, XMLDB or whatever. Since the data are in CML where
> molecule has an id attribute set in the XSLT transformation we can now
> retrieve entries with something like:
>
> <clax>
> <claxRequest service="XMLStorage">
> <arg role="context" prefix="cml"
> namespace="http://www.xml-cml.org/schema"/>
> <arg role="search" xpath="//cml:molecule[@id='"28309"/>
> </claxRequest>
> <claxResponse />
> <claxResponse url="file://usr/pmr/28309.cml"/>
> </clax>
this is a simple I/O request :
<io:request name="myDoc"
connect="xmldb:provider://user:password@host:port/" result-type="SAX"
type="xpath" query="//cml:molecule[@id='28309']"/>
<xcl:transform output="file:///usr/pmr/28309.cml" source="{ $myDoc }"/>
>
> I hope that these examples show that XML functionality can be provided
> on a client and the details can be largely hidden from the user (human
> or machine). The key requirements are:
> - agreement and enthusiasm to do it.
At this time, I only agreed with myself, but I'm enthusiastic :)
> - a design for the environment (it clearly involves having to run code,
> probably in Java)
My own implementation is in Java, but other language/platform could be
considered
> - a simple means of installing the language required (Java, Python, etc.)
Just unzip one of the distribution files somewhere on your local drive.
As usually, Web applications can also be deployed in .war
> - a design for the configuration of the CLAX components
I use a kind of catalog, that I named Active Catalog, which is an
extension of OASIS XML Catalogs, but that does a little more than simle
URI mappings : it can retrieve, build, and cache components
> - a design for the CLAX API
I did it through several XML libraries, each focusing on a single
problematic (I/O, system interactions, SQL, Web, etc)
> - a set of basic XML-aware operations, configured to run under the CLAX
> API.
This is the purpose of the XML Control Language :
http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/xcl/xcl.html
>
> As I said earlier, we intend to explore this and would be delighted if
> there were others who shared the vision and were prepared to do some
> hacking. As yet I cannot see any technical reason why it should not be
> "fairly simple" to implement. We are prepared to throw away V0.1 if a
> better approach emerges.
>
> P.
>
>
> Peter Murray-Rust
> Unilever Centre for Molecular Sciences Informatics
> University of Cambridge,
> Lensfield Road, Cambridge CB2 1EW, UK
> +44-1223-763069
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
--
Cordialement,
///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
-----------------------------
http://reflex.gforge.inria.fr/
Have the RefleX !
|