Whoops,
Just realised the 1.4 code had a static function table as well. Should have
checked closer. So this would imply that if I have anything sensitive to the
context of the application, I need to have my installed XPath function "find
out" the context (as apposed to multiple installed versions according to the
thread).
Cheers,
Berin
>
> From: <[EMAIL PROTECTED]>
> Subject: Latest CVS
> Date: 15/11/2002 13:01:11
> To: [email protected]
>
> David,
>
> I am converting some code over to the "new" DOM implementation in Xerces, so
> last night downloaded the latest (at that time) CVS tarball.
>
> Always a dangerous thing to do.....
>
> Worked out how to move to the new *Wrapper classes, and had a whole lot of
> fun and then came up with two questions.
>
> Firstly - I notice that the wrappers treat DOMNode pointers as const. Makes
> sense, but means that if I want to edit a returned node (e.g. from an XPath
> selection) then I need to cast the return. Was there a reason for moving to
> const (other than the obvious of it being a cleaner programming model for the
> library)?
>
> Secondly - I install an additional XPath function, which now causes an
> exception. Being curious I went through the code and realised the function
> table is in the middle of being re-written (as I said - working from CVS code
> is always dangerous).
>
> No big deal - will move back to a stable version, but I noticed that the
> function table is now static. So the question was will this also be true of
> user installed functions (i.e. will they be installed into the static table)?
>
>
> I have a function that is context sensitive (the "here()" function defined in
> XML Signature). The easiest way to do this function is install an instance
> with the appropriate node hard-coded and then un-install when the XPath
> selection is done. This is fine under a static table until you hit multiple
> threads, at which point things could get interesting. Different threads
> might want to install slightly different versions of the same function at any
> given time.
>
> I realise the code is all in development and I am jumping the gun on the
> questions. Was really just curious on both counts.
>
> Cheers,
> Berin
>
> This message was sent through MyMail http://www.mymail.com.au
>
>
>
This message was sent through MyMail http://www.mymail.com.au