RE: [cam] Variable Names

From
martin.me.robertsAbt.com
Date
2003-06-20T13:35:20+00:00
ID
Thread
RE: [cam] Variable Names
Title: Message

Further investigation shows the following would be possible but different 
if we used native xpath to resolve these conditions:

 

    equal  would be come => $variable = 
'testValue'

    NOTequal(value,'value') => 
not(value1,'value')

    greaterthan(v,v) => value > 
value

    lessthan(v,v) => value < value or value &lt; 
value

    greaterthanEQ => value >= 
value

    lessthanEQ => value <= value or value &lt;= 
value

    begins => 
starts-with(value,value)

    ends => ends-with(value,value)

    contains => as stated

 

    We would also get for free string-length(), count() 
etc...  plus we get someone else to do the exception 
management.

 

    I personally am all for not reinventing things.  The 
problem would be lookup() and member() but looking at the code it should be 
possible to extend the function sets supported by Jaxen.  There is a minor 
bug in jaxen and this is that the id() function does not seem to work.  
Minor problem.

Martin 
Roberts
xml designer,
BT Exact
e-mail: 

tel: +44(0) 1473 
609785  clickdial
fax: +44(0) 1473 609834
Intranet Site :http://twiki.btlabs.bt.co.uk/twiki 

  

  
-----Original Message-----
From: 
   [mailto:] 
Sent: 20 
  June 2003 13:11
To: 
Cc: 
  
Subject: [cam] Variable 
  Names

  
David, 
  
        I am 
  using JDOM and it has a link to the xpath tools from jaxen.  One of the 
  things you can do is setVariables.  If then we had our variable in 
  $varName format we could simply leave the paths alone set the variables based 
  on the as:Declaration sections.

  
        This 
  would make life easier. 

  
        I am 
  going to run with this. 

  
Martin 
  Roberts
xml designer,
BT Exact
e-mail: 
tel: +44(0) 1473 
  609785  clickdial
fax: 
  +44(0) 1473 609834
Intranet Site :http://twiki.btlabs.bt.co.uk/twiki 
pp 16 Floor 5, Orion Building, Adastral Park, Martlesham, 
  Ipswich IP5 3RE, UK 
  
    
British 
    Telecommunications plc
Registered office: 
    81 Newgate Street London EC1A 7AJ
Registered in 
    England no. 1800000 
    
This electronic message contains information from British 
    Telecommunications plc which may be privileged or confidential. The 
    information is intended to be for the use of the individual(s) or entity 
    named above. If you are not the intended recipient be aware that any 
    disclosure, copying, distribution or use of the contents of this information 
    is prohibited. If you have received this electronic message in error, please 
    notify us by telephone or email (to the numbers or address above) 
    immediately.