Hi!

I'm a novice to xalan and have a problem:
I've got a big XML file representing a product calalogue. here an example
excerpt:
<catalogue>
  <chapter>
    <!-- some more hierarchy -->
    <product uid="12345">
      <article-set>
         <article uid="87"><!-- omitted --></article>
         <article uid="88"><!-- omitted --></article>
         <article uid="89"><!-- omitted --></article>
      </article-set>
    </product>
    <product uid="7680">
        <!-- a.s.o -->
    </product>
  </chapter>
</catalogue>

In my programm I have to process most (or all) of the elements having a uid
attribute one by one, no matter what kind of element they are.
I could use "//[EMAIL PROTECTED] = myuid]" everytime, but for performance 
issues, I
want to cache the list of elements having a uid.

so I use "//[EMAIL PROTECTED]" to get these elements. this xpath gives me a
XNodeSetBase.
in further expressions, I have to select a specific element in this nodeset
by its uid.

in Xalan-C API reference, I found XObjectPtr::rtree() returning a const
XalanDocumentTreeFragment &. This class is a subclass of XalanNode and could
be used as a context for the XPathEvaluator (the const can be casted away,
see  http://marc.theaimsgroup.com/?l=xalan-c-users&m=108145747222899&w=2
here )

but when I'm using this, a NULL-pointer is accessed. That's because
XObjectResultTreeFragProxyBase::getOwnerDocument()  always returns 0, so I
can't get the nodeset's owner document...

is there any way to store a nodelist returned by an XPath to be used as the
context on another XPath?

hope you can help me

bye
King Nak
-- 
View this message in context: 
http://www.nabble.com/Evaluating-XPath-on-NodeSet-tf2119970.html#a5846752
Sent from the Xalan - C - Users forum at Nabble.com.

Reply via email to