Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mal wieder xsl-Variable

Empfohlene Antworten

Veröffentlicht

Hallo,

mal ne Frage, ist es in XSL möglich eine Variable außerhalb eines Templates anzulegen? Dies würde so aussehen:

<xsl:variable name="abt" />

Anschließend soll diese Variable in einem Template gefüllt werden. Dies würde so aussehen:

<xsl:variable name="abt">  
<xsl:value-of select="."/>
</xsl:variable>[/PHP]

diese Variable will ich nun wiederum in einem weiteren Template verwenden. Kann ich das irgendwie machen?

Hab das mal versucht, aber irgendwie hat das net so funktioniert :-(

Gruß Snopsy

Nee, kann mir auch nicht vorstellen, dass das funktioniert. Aber Du hast zwei Möglichkeiten. Entweder Du definierst Deine Variable außerhalb des Templates und belegst sie direkt. Das sollte kein Problem sein. Die Variable kannst Du dann in jedem Template, das zu dem Stylesheet gehört, referenzieren.

Oder wenn Du in dem erstenTemplate das nächsteTemplate aufrufst, kannst Du so eine Variable an das Template übergeben:

<xsl:call-template name="next_template">

<xsl:with-param name="abt" select="ABTEILUNG"/>

</xsl:call-template>

Mit $abt kannst Du in dem nächsten Template die Variable referenzieren.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.