On Mar 7, 2007, at 16:27, Braumüller, Hans wrote:

Hi,

i am trying following:

I defined some layout properties in an external document, saved in
<xsl:variable name="docProperties" select="document ($p_propFile,document(''))"/>

Then i want by  condition, different properties, like for example:

    <xsl:variable name="path">
      <xsl:choose>
<xsl:when test="$nodeName = 'funktionen' ">/root/klasse/ funktion/head</xsl:when>
        <xsl:otherwise>/root/head</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>

Now my pseudo-code (It´s not working :-( ) :

Nope, you cannot create something like a dynamic XPath expression with standard XSLT 1.0

What you could do, IIC, is:

<xsl:variable name="headProp">
  <xsl:choose>
    <xsl:when test="$nodeName = 'funktionen'">
<xsl:copy-of select="$docProperties/root/klasse/funktion/head/ @*" />
    </xsl:when>
    <xsl:otherwise>
      <xsl:copy-of select="$docProperties/root/head/@*" />
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>

<fo:table-header>
  <xsl:copy-of select="$headProp" />
...

Untested, though, may need some tweaking...

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to