|
Subject: [xsl] Re: Re: Using a variable in XSLT From: Tim Müller-Seydlitz <tms@xxxxxxxxxxxxxxxxxx> Date: Wed, 03 Sep 2003 09:48:48 +0200 |
Hi David, thanks very much. Let me detail my inquiry further.
However xsl:variable is a node set and not a string
Variables may contain either node sets or strings (or other things) but your variable
contains a string.<xsl:variable name="SystemSelected" select='"sys:one"' />
Without seeing your source file it's rather hard to guess what your intended processing is, but possibly something like
<xsl:template match="xs:documentation">
<xsl:choose>
<xsl:when test="lang('de') and *[name()="$SystemSelected]">
.... <xs:element name="account" type="Account">
<xs:annotation>
<xs:documentation xml:lang="en">This is the English general description
<sys:one>That's the special purpose description for system 1</sys:one>
<sys:two>That's the special purpose description for system 2</sys:two>
</xs:documentation>
<xs:documentation xml:lang="de">Das ist die deutsche allgemeneine Beschreibung.
<sys:one>Das ist die spezielle Beschreibung für System 1</sys:one>
<sys:two>Das ist die spezielle Beschreibung für System 2</sys:two> </xs:documentation>
</xs:annotation>
</xs:element>From this structure I want to select the special purpose documentation for system one and later for system two.As both selection are very similar I would like to use a variable in an XSLT style sheet that lets me either choose sys:one or sys:two.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] parse an xml file, Michael Kay | Thread | Re: [xsl] Re: Re: Using a variable , David Carlisle |
| Re: [xsl] parse an xml file, M. David Peterson | Date | Re: [xsl] parse an xml file, Mukul Gandhi |
| Month |