[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-security-dev
Subject:    SOLVED: Re: Somone... help... please ...
From:       Heiner Westphal <Heiner.Westphal () verit ! de>
Date:       2005-03-09 20:51:44
Message-ID: 422F61E0.7050004 () verit ! de
[Download RAW message or body]

/*[local-name()='elementName']-syntax did the trick.

Fine!

I don't like how the XPaths look either, but at least they match
the right nodes. AFAIK the next version of XPath will be somewhat
less unwieldy with regard to namespaces, but it may take a while
before we can take advantage of the new features.

BTW.
Please let the list know, when your problem is solved
be it by picking up a suggestion or by your own investigation.
That way
1. others may benefit of the same solution and
2. no more suggestions dealing with the issue get posted on a
    thread that can be closed.

Thanx,

Heiner


Ritesh.Aswaney@syntegra.com wrote:
> I had almost given up hope but then I used the format of xpath u had
> mentioned, that is using the local name functions, and it seems to
> workkkkkkkk
> 
> Voila !
> 
> Thanks a million
> 
> If u think u know a more elegant way to frame the xpath, do lemme know
> 
> Meanwhile, thanks n god bless :)
> 
> -----Original Message-----
> From: Heiner Westphal [mailto:Heiner.Westphal@verit.de] 
> Sent: 09 March 2005 19:54
> To: security-dev@xml.apache.org
> Subject: Re: Somone... help... please ...
> 
> Ritesh,
> 
> leaving the namepaceAware on true and use some ugly XPath like
> "//*[local-name()='Header']/*[local-name()='SenderInfo']/*[local-name()='Send
> erID']"
> will match the node you would have called
> "//Header/SenderInfo/SenderID" in absence of namespaces.
> 
> Sadly it matches nodes even in the wrong namespace, but that is usualy 
> not a problem, because its not common to mix the same element names from 
> different namespaces.
> 
> Dont know if it works in your case, but I would give it a try.
> 
> Regards,
> 
> Heiner
> 
> Ritesh.Aswaney@syntegra.com wrote:
> 
> > Hello All,
> > 
> > 
> > 
> > (Raul, Berin, someone listen to me ...)
> > 
> > 
> > 
> > I have managed to generated the XML DSig and embed it into the required>
> 
> document at the location desired
> 
> > (There is a requirement for the dsig element to be present at a fixed 
> > location in the document)
> > 
> > 
> > 
> > Now when I try to verify the signature, obviously I have to select the 
> > element using xpath
> > 
> > If the DocumentBuilderFactory object is set to 
> > *namespaceAware**(**true)*, the xpath just wont evaluate, coz of 
> > namespace problems
> > 
> > (I ve tried a lot of things from my limited knowledge, but it just wont>
> 
> evaluate)
> 
> > 
> > 
> > It evaluates when the *namespaceAware**(**false) *, but then it throws 
> > this error
> > 
> > 
> > 
> > org.apache.xml.security.exceptions.XMLSecurityException: Cannot create a>
> 
> null:null from a http://www.w3.org/2000/09/xmldsig#:Signature element
> 
> > 
> > 
> > What is the way out?
> > 
> > 
> > 
> > I have this code due for delivery like real soon, can someone please 
> > take time out and lemme know how to get it to work ?
> > 
> > I ve completely run out of ideasssssss
> > 
> > 
> > 
> > Best Always,
> > 
> 
> .............................................................................
> ...........................................
> 
> > *Ritesh Aswaney*
> > ( Mobile: +44 7909540132
> > 
> > 
> 
> .............................................................................
> ............................................ 
> 
> > 
> > 
> > 
> > > 
> > 
> > ********************************************************************
> > 
> > This email may contain information which is privileged or confidential.>
> 
> If you are not the intended recipient of this email, please notify the 
> 
> > sender immediately and delete it without reading, copying, storing, 
> > forwarding or disclosing its contents to any other person
> > Thank you
> > 
> > Check us out at http://www.bt.com/consulting
> > 
> > ********************************************************************
> > > 
> 
> 
> 
> 
> ********************************************************************
> 
> This email may contain information which is privileged or confidential. If you are \
> not the intended recipient of this email, please notify the sender immediately and \
> delete it without reading, copying, storing, forwarding or disclosing its contents \
> to any other person Thank you
> 
> Check us out at http://www.bt.com/consulting
> 
> ********************************************************************
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic