<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<!-- ************************************************************************* -->
<!-- * This XSL-stylesheet contains processing instructions made available   * -->
<!-- * by the xmledit application.                                           * -->
<!-- * Created 21. march 2004 by Even Halvorsen (even.halvorsen@usit.uio.no) * -->
<!-- ************************************************************************* -->


<!-- ************************************************************************* -->
<!-- * Available variables;                                   .              * -->
<!-- ************************************************************************* -->

  <xsl:variable name="DOCNAME" select="processing-instruction('docname')"/>
  <xsl:variable name="USERNAME" select="processing-instruction('username')"/>
  <xsl:variable name="BREADCRUMB" select="//processing-instruction('breadcrumb')"/>
  <xsl:variable name="BUTTONFRAME" select="//processing-instruction('button-frame')"/>

  <xsl:variable name="RESOURCESURL" select="//processing-instruction('resources-url')"/>
  <xsl:variable name="CMSURL" select="//processing-instruction('cms-url')"/>

  <!-- Bygger opp browseurl til mappen dokumentet ligger i -->
  <xsl:variable name="BROWSEURL"> 
    <xsl:choose>
      <xsl:when test="not(contains($tmp-browseurl, '?')) and normalize-space($tmp-browseurl) != ''">
        <xsl:value-of select="concat($tmp-browseurl,'?massa=var1')"/></xsl:when>
      <xsl:otherwise><xsl:value-of select="$tmp-browseurl"/></xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:variable name="tmp-browseurl" select="//processing-instruction('browse-url')"/>

  <xsl:variable name="BASEURL">
    <xsl:choose>
      <xsl:when test="not(contains($tmp-baseurl, '?'))"><xsl:value-of select="concat($tmp-baseurl,'?massa=var1')"/></xsl:when>
      <xsl:otherwise><xsl:value-of select="$tmp-baseurl"/></xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <xsl:variable name="tmp-baseurl"><xsl:value-of select="//processing-instruction('uri')"/></xsl:variable>

  <xsl:variable name="ERRORMESSAGE" select="processing-instruction('errormessage')"/>

  <xsl:variable name="DAY-MONTH-YEAR" select="//processing-instruction('day-month-year')"/>
  <xsl:variable name="DAY" select="substring($DAY-MONTH-YEAR,1,2)"/> 
  <xsl:variable name="MONTH" select="substring($DAY-MONTH-YEAR,4,2)"/>
  <xsl:variable name="YEAR" select="substring($DAY-MONTH-YEAR,7,4)"/>


<!-- ************************************************************************* -->
<!-- * Processing instructions used to control different modes.              * -->
<!-- * (used in system-edit.xsl                                              * -->
<!-- ************************************************************************* -->

  <!-- xsl:variable name="MODE" select="//processing-instruction('mode')" / -->
  <!-- values: delete, move, edit, newElement, newElementAt -->

  <!-- xsl:variable name="EXPANDED" select="processing-instruction('expanded')" / -->
  <!-- value: true, if instruction exist -->

  <!-- xsl:variable name="MARKED" select="processing-instruction('marked')"/ -->
  <!-- value: true, if instruction exist -->



</xsl:stylesheet>

