Hello All,
I am also a newbie to xindice and xpath. I am wondering if it is
possible to use Xpath to select a node without selecting its contents or
all of its children. We are working on a project that will have elements
that have sizable chunks of text data as their contents. In certain
parts of the application we need to be able to represent the entire
system's hierarchy, but we don't want to pull all of the contents of the
nodes into memory.
Here's an example:
<lecture>
<header>
<id>2</id>
<module_id>8</module_id>
<title> Lecture 1: An introduction to nothing</title>
</header>
<contents>
Blablahblahblahablahablahablahblah...really long
contents here
</contents>
<topic>
<header>
<id>5</id>
<module_id>3</module_id>
<title> Topic 1: An introduction to
nothing</title>
</header>
<contents>
Blablahblahblahablahablahablahblah...reallyreally long contents here
</contents>
</topic>
</lecture>
In this case, the information that we need to represent the lecture and
topic nodes visually in our hierarchy lives in the <header> element,
however in order to preserve the hierarchical representation of the
<header> element we would like to select something like the following:
<lecture>
<header>
<id>2</id>
<module_id>8</module_id>
<title> Lecture 1: An introduction to nothing</title>
</header>
<topic>
<header>
<id>5</id>
<module_id>3</module_id>
<title> Topic 1: An introduction to
nothing</title>
</header>
</topic>
</lecture>
Is this possible with Xpath or can you folks think of a better way to do
this? I apologize if this is very ignorant.
Thanks for any help you can offer!
catie