xsl-list
[Top] [All Lists]

attribute test

2005-09-15 11:28:26
Hi guys, thanks in advance for the help

This should be a relatively simple solution but my mind ain't quite
working right today and google isn't being good to me.

I'm looking to test if any elements of a certain type do NOT have an
attribute with a specific value in an entire xml doc. For instance.

<!-- xml doc 1 -->
<Root>
<foo>Hello World</foo>
<foo att="hi">This would output</foo>
</Root>

<!-- xml doc 2 -->
<Root>
<foo att="goodbye>Hello World</foo>
<foo att="hi">This would output</foo>
</Root>

<!-- xml doc 3 -->
<Root>
<foo att="hi">Hello World</foo>
<foo att="hi">This would not output</foo>
</Root>

<!-- Pseudo xsl -->
<xsl:template match="/">
<xsl:if test="<!-- if all the foo elements in the doc only contain the
attribute att with a value of hi, don't output -->">
  <xsl:apply-templates/>
</xsl:if>
</xsl:template>

ok, hope that's enough to illustrate the problem. I appreciate any
help anyone can offer.

Cheers,

Spencer

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>