W3C home > Mailing lists > Public > public-cwm-talk@w3.org > January to March 2006

RE: New XML and XPath built-ins for CWM

From: Waleed K. Abdulla <waleed_abdulla@xrules.org>
Date: Fri, 10 Mar 2006 12:07:15 -0800
To: "'Tim Berners-Lee'" <timbl@w3.org>
Cc: "'cwm'" <public-cwm-talk@w3.org>, "'Dan Connolly'" <connolly@w3.org>
Message-ID: <004001c6447e$3a9ccb00$6701a8c0@waleedxp3>

    My question was about computed 'resources' (as opposed to computed
properties). My early implementation of XPath built-ins is at: 


    This implementation is limited because I couldn't find support for
computed resources in CWM. To explain the need for computed resources,
see this example:

("<Order><Item>Book</Item><Item>Pen</Item></Order>" "/Order/Item")
xpath:selectSingleNode :node .

    The problem with this is that each time I use the property I have to
pass the whole XML document as a string and have it parsed. This is,
obviously, not practical for big XML documents. It would be great if I
can load and parse the XML document once, and then from that point
forward, treat it as a resource (object) inside CWM. My code will, then,
look like this:

"<Order>...</Order>"	x:parseAsXmlDocument		:xml .

(:xml "/Order/Item")	xpath:selectSingleNode 		:node .

where, :xml is of type x:XmlDocument and :node is of type x:XmlNode.

    So, :xml is treated as a resource in CWM, yet a reference to an
external implementation (a DOM in this case) is available that can be
used by properties such as xpath:selectSingleNode to execute XPath

    There might be support for this in CWM already, but I couldn't find


-----Original Message-----
From: public-cwm-talk-request@w3.org
[mailto:public-cwm-talk-request@w3.org] On Behalf Of Tim Berners-Lee
Sent: Thursday, March 09, 2006 11:40 AM
To: Waleed Abdulla
Cc: cwm; Dan Connolly
Subject: Re: New XML and XPath built-ins for CWM


Juts came across your question a year ago asking about cwm built-ins.

Yes, cwm does support computed properties.

Did you get anywhere with making XPath builtins and XML dom data types?

Tim BL
Received on Friday, 10 March 2006 20:07:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:05 UTC