This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
test if attribute contains value and proceed
- From: thomas <thomas dot lohbeck at ksc dot ch>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Wed, 25 Sep 2002 13:31:01 +0200
- Subject: [xsl] test if attribute contains value and proceed
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello I need to test if any of the /investitionen/massnahme/@datum has a
value in it. if EVERY @datum is filled with an value, proceed.
Something like:
<xsl:if test="/investitionen/massnahme/@datum">
<fo:block>everything is ok!</fo:block>
</xsl:if>
what do I not understand with my newbie brain?
<investitionen>
<massnahme datum="Dezember 2002">
<produkte>
<produkt id="1"/>
</produkte>
</massnahme>
<massnahme datum="Juni 2005">
<produkte>
<produkt id="3"/>
</produkte>
</massnahme>
<massnahme datum="Juni 2006">
<produkte>
<produkt id="4"/>
</produkte>
</massnahme>
</investitionen>
=OK
<investitionen>
<massnahme datum="Dezember 2002">
<produkte>
<produkt id="1"/>
</produkte>
</massnahme>
<massnahme datum="">
<produkte>
<produkt id="3"/>
</produkte>
</massnahme>
<massnahme datum="Juni 2006">
<produkte>
<produkt id="4"/>
</produkte>
</massnahme>
</investitionen>
=NOT OK
<investitionen>
<massnahme datum="">
<produkte>
<produkt id="1"/>
</produkte>
</massnahme>
<massnahme datum="">
<produkte>
<produkt id="3"/>
</produkte>
</massnahme>
<massnahme datum="">
<produkte>
<produkt id="4"/>
</produkte>
</massnahme>
</investitionen>
=NOT OK
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list