Hi Richard
----- Original Message -----
From: "Richard Sand" <[EMAIL PROTECTED]>
> Hi all,
>
> I have a simple xtags file that loops through all of the topics and
keywords
> in an xml help file.
>
> My loop is:
>
> <xtags:forEach select="/help/topic | /help/keyword">
>
> Within this loop, I want to process topics different than keywords. I
> haven't been able to find a way to do this. I tried to do it by testing
for
> the existence of a child that only exists for a keyword, but the xtag:when
> tag doesn't seem to accept wildcards in its test parameter, i.e.:
>
> <xtags:forEach select="/help/topic | /help/keyword">
> <xtags:choose>
> <xtags:when test="keyword_file=*">
> ....
> </xtags:when>
> <xtags:otherwise>
> .....
> </xtags:otherwise>
> </xtags:choose>
> </xtags:forEach>
You could try this...
<xtags:when test="keyword_file">
which will match if the current node (a <keyword> or <topic>) has at least
one child <keyword_file> child.
> Is there some way to do this?
Maybe something like this, iterate through all children of <help> then
branch based on the name
<xtags:forEach select="/help/*">
<xtags:choose>
<xtags:when test="name()='topic'">
....
process a <topic>
...
</xtags:when>
<xtags:when test="name()='keyword'">
....
process a <keyword>
...
</xtags:when>
<xtags:otherwise>
.....
</xtags:otherwise>
</xtags:choose>
</xtags:forEach>
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>