On 9/15/05, Spencer Tickner <spencertickner(_at_)gmail(_dot_)com> wrote:
hi guys,
First, Thanks for the suggestions, Unfortunately both return all 3
test cases first mentioned. I will continue to try to work this out,
Once again if you have any more suggestions they are very appreciated.
Ah, that's because I must confess to not paying that close of
attention to your original post.
:P
You actually have two conditions:
first, any document that contains one foo that does not have the @att
should print
if all foo have @att then they should not have 'hi'
A quick path of the top of my head (and I did test it) shows
<xsl:template match="/">
<xsl:if test="/Root/foo[not(@att)] or /Root/foo/@att!='hi'">
<xsl:apply-templates />
</xsl:if>
</xsl:template>
works.
Jon Gorman
Thanks,
Spencer
On 9/15/05, Jon Gorman <jonathan(_dot_)gorman(_at_)gmail(_dot_)com> wrote:
Ack, been hit by the stolen words gnomes"
This
(not() is negation. When working with node sets and equality (=,!=) I
believe
XPath returns true if there is any node in the node set that satisifies
the
condition.
I was kinda wondering how that solution was working but figured
perhaps my brain was scrambled today as well ;).
Well, apparently it is at least partially scrambled.
Jon Gorman
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--