[XML-SIG] Documenting xpath

Uche Ogbuji uche.ogbuji@fourthought.com
Thu, 05 Apr 2001 23:27:47 -0600


> Next week I want to start documenting the xpath (nee 4XPath) classes.
> I'll work bottom-up.

Unfortunately, 4XPath is not fully merged in yet.  It's still actively 
developed as part of 4Suite and I try to merge in at stable points.

If you let me know when you want to start your work, I'll try to sync up for 
you, but I'd be careful.

Normally it wouldn't be a big deal, but I'm currently whipping 4Suite into 
shape for the 0.11.0 release so changes are a-brewing.

4XSLT and 4XPath will be moving completely into PyXML immediately following 
the 4Suite 1.0 release ca. June 1.  Note that they'll keep their names while 
in PyXML.

> Package-level:
>     Errors: SyntaxException(pos,msg), GeneralException, Error class(?)

I just added a RuntimeException class which deals with such things as 
undefined variable and function refs during eval.

>     def Evaluate(expr, contextNode=None, context=None):
> 	registers $EXTMODULES, creates context, compiles, evaluates
> 
>     def Compile(expr):
> 	calls "a" compiler (currently only pyxpath)

No, same with 4XPath.

>     def CreateContext(contextNode):
> 
> Writing extensions:
>     if os.environ.has_key('EXTMODULES'):
>     def RegisterExtensionModules(moduleNames):
> 	(a dictionary of (namespace-string localname-string):method)

Yes.  The user can either set the environment or just directly call 
RegisterExtensionModules(['mymodulename'])

You'll want to have a look at

http://services.4Suite.org/documents/4Suite/4XPath-Api

to get a start.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python