remove root element

Benoit's Avatar

Benoit

21 May, 2015 03:47 PM

Hello,

I have to produce a simple text file with key-value pairs (mapped in the datadef as node Identifier-value). I am working on a 7.0.3 cascade server instance.

This is what I have for the moment:
Template :

<node><system-region name="DEFAULT"/></node><!--#START-CODE#END-CODE-->

XSL:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="exsl" version="1.1"  xmlns:exsl="http://exslt.org/common">
  
    <xsl:param name="system-interface"/>
    
<xsl:template match="system-index-block">
<xsl:variable name="content" select="//calling-page/system-page/system-data-structure"/><xsl:param name="system-interface"/>
<xsl:comment>#START-ROOT-CODE<xsl:for-each select="$content/node()"><xsl:value-of select="concat(name(.),': ')"/><xsl:value-of select="."/>
<xsl:choose><xsl:when test="$system-interface='admin'"><br/></xsl:when><xsl:otherwise><xsl:text>
</xsl:text></xsl:otherwise></xsl:choose></xsl:for-each>
<xsl:text>#</xsl:text>#END-ROOT-CODE</xsl:comment>
</xsl:template>
</xsl:stylesheet>

I got this in output:

Key1: value1
Key2: value2
#<node></node>

Would it be possible in cascade version 7.0.3 to remove this last line # ?

Many Thanks for your support,

Best regards,

Benoît

  1. 1 Posted by Ryan Griffith on 21 May, 2015 03:58 PM

    Ryan Griffith's Avatar

    Hi Benoît,

    Unfortunately, I don't think you will be able to remove that last line using the older code sections. The only way to remove that line would be to use the cascade-skip tag, which was introduced with the code section improvements in the Cascade 7.2 release.

    Please let me know if you have any questions.

    Thanks!

  2. Tim closed this discussion on 17 Jun, 2015 02:19 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM