A
Andy Fish
hello,
I am trying to determine whether the preceding sibling (ignoring anything
other than nodes or comments) is a comment. in procedural terms it's:
for each preceding sibling
if (node type is node or comment)
return (node type = comment)
end if
end loop
the first step seems to be to list the preceding siblings which are either
nodes or comments, but this doesn't work:
<xsl: if test="preceding-sibling:*|comment()">
because the | has too high a priority, and I can't use brackets like this:
<xsl: if test="preceding-sibling*|comment())">
because they aren't allowed. any clues here please.
TIA
Andy
I am trying to determine whether the preceding sibling (ignoring anything
other than nodes or comments) is a comment. in procedural terms it's:
for each preceding sibling
if (node type is node or comment)
return (node type = comment)
end if
end loop
the first step seems to be to list the preceding siblings which are either
nodes or comments, but this doesn't work:
<xsl: if test="preceding-sibling:*|comment()">
because the | has too high a priority, and I can't use brackets like this:
<xsl: if test="preceding-sibling*|comment())">
because they aren't allowed. any clues here please.
TIA
Andy