|
Subject: Re: [xsl] Constructing complex xs:string in variable From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 9 Oct 2019 14:56:17 -0000 |
On Wed, 2019-10-09 at 13:28 +0000, Christian Roth mulberrytech-
lists@xxxxxxxx wrote:
> <xsl:variable name="var" as="xs:string">
> <xsl:text>prefix</xsl:text>
> <xsl:value-of select="'part1'"/>
> <!-- follows more complex code producing further fragments of
> desired result string -->
> </xsl:variable>
>
>
> This gives me the error message
Yes - I'd probably write,
<xsl:variable name="var" as="xs:string"
select="concat('prefix, 'part1', ....) "/>
In XSLT 3 you could also do,
<xsl:variable name="var"
as="xs:string">prefix{'part1'}....</xsl:variable>
Assuming some XSL ancestor has expand-text="yes"
Liam
--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Constructing complex xs:s, Christian Roth mulbe | Thread | Re: [xsl] Constructing complex xs:s, Piez, Wendell A. (Fe |
| Re: [xsl] Constructing complex xs:s, Eliot Kimber ekimber | Date | Re: [xsl] Constructing complex xs:s, Michael Kay mike@xxx |
| Month |