jeudi 25 avril 2019

XSLT/Xpath: How to find out that something is or isn´t in key (with if)?

I have problem with my code in XSLT with if. I am using key function and there I find out if something is in the key or not.

    <xsl:key name="hlp" match="help" use="@id" />
    ...
    <xsl:if test="key('hlp', @some_id) !=''">
    ...
    </xsl:if>

That is correct it gives me what I want but how I can make opposite condition that @some_id isn´t in key hlp... I mean:

    <xsl:if test="key('hlp', @some_id) <!--is equal--> ''">
    ...
    </xsl:if>

Is there something like that in XSLT/XPath?

Aucun commentaire:

Enregistrer un commentaire