---
title: "xsl: Parameter för att växla mellan if-sats"
type: "forum-thread"
url: "https://www.webforum.nu/amne/xml/137654-xsl-parameter-för-att-växla-mellan-if-sats"
topic: "XML"
topic_url: "https://www.webforum.nu/amne/xml"
author: "inspiro"
published: "2005-11-15T10:27:47.000Z"
updated: "2005-11-15T13:12:57.000Z"
replies: 1
views: 245
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/xml/137654-xsl-parameter-för-att-växla-mellan-if-sats"
---

# xsl: Parameter för att växla mellan if-sats

## #1 — inspiro, 2005-11-15T10:27Z

Jag vill göra nåt i den här stilen:

```
<xsl:variable name="test">0</xsl:variable>

<xsl:if test="$test = 0">
  <xsl:variable name="test">1</xsl:variable> 
</xsl:if>

<xsl:if test="$test = 1">
  <xsl:variable name="test">0</xsl:variable> 
</xsl:if>
```

Men som vanligt får jag det inte att funka så bra...     :l

Permalänk: https://www.webforum.nu/p/137654

## #2 — inspiro, 2005-11-15T13:12Z

Jag tänkte nog fel, man kan ju inte spara undan ett värde sådär... jag slängde in ett attribut i xml-en istället som jag kollar mot!

Permalänk: https://www.webforum.nu/p/1710676

---

Tråden på webben: https://www.webforum.nu/amne/xml/137654-xsl-parameter-för-att-växla-mellan-if-sats
