Hi Yana,
Sorry for providing only a few data, the whole scenario is the
following:

I’m integrating xmlbeans with the apache xmlsecurity framework, so the
problem comes when trying to parse xml signatures. Those signatures can
be enveloping (that means that the signature node is the root node) or
enveloped (that means that the signature node is a node inside the tree
but not the root node).

When I parse the file where the root node is a signature (a typed node)
a SignatureType object (extending XmlObject) is returned. Then I execute
a query to find all Signature nodes inside it, my query is : query=
"declare namespace ds='http://www.w3.org/2000/09/xmldsig#';
//ds:Signature", if I execute a select path over this node
(base.selectPath(xpathQuery); where base is the parsed object) a
SignatureType node is returned … by now everything is fine.

Otherwise, when I parse an xml file where the root node is not a known
node, for example:

<?xml version="1.0" encoding="UTF-8"?>
<Foo xmlns:bar="urn:bar" xmlns="urn:foo" xml:space="preserve">
  <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#";>
        ...
  </dsig:Signature>
</Foo>

an instance of XmlAnyTypeImpl is returned, because I don't have a
compiled type representing 'Foo' element for the given namespace.
When I execute the previous query again over the returned node,("declare
namespace ds='http://www.w3.org/2000/09/xmldsig#'),it returns an array
containing 1 XmlObject of the XmlAnyTypeImpl representing the Signature
node.

Thanks in advance :D

Dave Garcia



-----Mensaje original-----
De: Yana Kadiyska [mailto:[EMAIL PROTECTED] 
Enviado el: martes, 13 de septiembre de 2005 21:19
Para: [email protected]
Asunto: RE: selectPath over XmlAnyTypeImpl

Hm, this is odd…does your query have reverse axes traversal? Are you
saying that base is of type XmlAnyTypeImpl but it’s content is typed?
Can you please send a short sample with your schema, instance and query?


From: David Garcia [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 13, 2005 12:12 PM
To: [email protected]
Subject: selectPath over XmlAnyTypeImpl

Hi,

I’m executing the following code over an XmlAnyTypeImpl

XmlObject result[]=base.selectPath(xpathQuery);

This query is supposed to return XmlObjects already compiled on my
system but it returns an array of XmlAnyTypeImpl objects.
If my base object is an instance of a compiled object it returns the
expected type of XmlObject.

Am I doing anything wrong?

Regards

Dave Garcia

 



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to