Subject: xsl:variable holding name of an xsl:param
Posted By: perissos Post Date: 12/5/2006 6:09:19 AM
Hello all,

I have the following situation:

I am developing a set of XSLs that take an XML doc as input and generate an HTML+Javascript editor for this particular XML doc.
These XSLs are invoked by a native Windows app, using the IE ActiveX control in hosted mode (so, only the latest version of MSXML is available!); something like the AJAX concept, but all on the desktop.

The only way that the native app has to pass context information to the XSLs is via runtime xsl:params.

Among others, the native app passes the following xsl:params
- idList: a comma-separated list of object ids that need special processing
- <id1>, <id2>...: A number of xsl:params, each named after each value in the list and containing some information.

Question:
Is there a way to use the value of an xsl:variable as a QName to get the value of one xsl:param?

For example, in the following fragment what should be added (if anything) in the placeholder?

<xsl:template name="processInfo">
    <xsl:param name="objectId"/>
    
    <xsl:variable name="isDirty" select="contains($idList, $objectId)"/>
    
    <xsl:if test="$isDirty = 'true'">
        <xsl:variable name="objectValue" select="[-->Missing part<--]"/>
        <!-- Some other, nasty stuff happenning here -->
    </xsl:if>
</xsl:template>

I have been googling all day about this but nothing has come up!
Could it be that I am asking the impossible?

Thank you for any help or hint that you may provide.

Cheers,
S.

Go to topic 53203

Return to index page 102
Return to index page 101
Return to index page 100
Return to index page 99
Return to index page 98
Return to index page 97
Return to index page 96
Return to index page 95
Return to index page 94
Return to index page 93