After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730171 - <xsl:fallback> doesn't add elements into the correct result tree hierarchy
<xsl:fallback> doesn't add elements into the correct result tree hierarchy
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-15 08:38 UTC by SATYA
Modified: 2019-05-12 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description SATYA 2014-05-15 08:38:56 UTC
The <xsl:fallback> instruction element is instantiated when its enclosing extension element is undefined; however, <xsl:fallback>, simply inserting them at the same hierarchy level as the <xsl:fallback> element, it instead appends them to the root node. So appending to the root node is not happening.

Sample template:

  <xsl:template match="/">
    <xsl:variable name="ns-temp-1">
      <parent>
        <older-sibling/>
        <test:test>
          <xsl:fallback>
            <middle-sibling/>
          </xsl:fallback>
        </test:test>
        <younger-sibling/>
      </parent>
    </xsl:variable>
    <xsl:variable xmlns:exslt-ext="http://xmlsoft.org/XSLT/namespace" name="ns" select="exslt:node-set($ns-temp-1)"/>
    <xsl:for-each select="$ns/*">
      <output>
        <xsl:value-of select="concat(&quot;Name: &quot;, name())"/>
      </output>
      <xsl:for-each select="./*">
        <output>
          <xsl:value-of select="concat(&quot;    Child name: &quot;, name())"/>
        </output>
      </xsl:for-each>
    </xsl:for-each>
  </xsl:template>


Above template results in:

Name: parent
    Child name: older-sibling
    Child name: younger-sibling
Name: middle-sibling