Project

Profile

Help

Bug #3748

closed

Text value templates don't work as child of xsl:variable

Added by Michael Kay about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2018-04-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

See https://stackoverflow.com/questions/49882695/text-value-templates-and-xslvariable

The following example demonstrates the problem:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"
  xmlns="http://www.w3.org/1999/xhtml/"
  version="3.0" expand-text="yes">
  <xsl:output method="xhtml" html-version="5"/>
  <xsl:template name="xsl:initial-template">
    <xsl:variable name="t">Source: {document-uri(.)}</xsl:variable>
    <html>
      <body>
        <p><xsl:value-of select="$t"/></p>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

Please register to edit this issue

Also available in: Atom PDF