Re: beginners filtering problem
"Dmitry Lizorkin" <[email protected]> Mon, 28 May 2007 17:30:18 +0400
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <000601c7a12c$5571c1e0$4cc69553@fiona> |
Hi, For example, you can also write your query as ((sxpath '(@ (*or* OID Name) *text*)) (node obj)) or ((sxpath "@*[self::OID or self::Name]/text()") (node obj)) Dmitry ----- Original Message ----- From: "Andy Chambers" <achambers.home-gM/[email protected]> To: <[email protected]> Sent: Monday, May 28, 2007 5:10 PM Subject: [ssax-sxml] beginners filtering problem > Hi, > > I'm having a little trouble getting to grips with sxpath and I wonder > if someone could help. Given a node like this > > (ItemDef (@ (SASFieldName "WTUNITS") > (OID "IT.WTUNITS") (Name "Weight Units") > (Length "2") (DataType "text"))) > > I'd like to get the text bits of the OID and Name attributes. > > The following does what I want but I'm not sure its as simple as it could > be > > ((sxpath '(*text*)) > ((node-or (sxpath '(@ OID)) > (sxpath '(@ Name))) (node obj)))) > > ..where (node obj) evaluates to the node described above > > I think that a solution involving the filter converter should make it > clearer but I haven't been able to get it to do what I mean. > > I'm using guile's sxpath if that makes a difference. > > Cheers, > Andy ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/