Comments

Release 1.0 - ...

The Smartsite PageProcessor supports outcommenting of code by using Xml-style comments, which are treated as literals and are never parsed. However, normal comments will still appear in the output, as they can hold meaningful data for site developers.

The following code:

Smartsite SXML CopyCode image Copy Code
<!--
<se:text>Hello world</se:text>
-->

... is not parsed, but kept "as is" in the output.

However, when a comment starts with two slashes, it is ignored altogether and not included in the output.

Smartsite SXML CopyCode image Copy Code
<!--//
<se:text>Hello world</se:text>
-->

The Rem macro has exactly the same effect:

Smartsite SXML CopyCode image Copy Code
<se:rem>
<se:text>Hello world</se:text>
</se:rem>

Individual macros and vipers can have a comment as well using the rem parameter. This remarks can be helpful for your collegue developers:

Smartsite SXML CopyCode image Copy Code
<se:text rem="this macro produces some text">Hello world</se:text>
 
<se:text>
 <se:parameters>
  <se:parameter name="rem">This macro produces some text</se:parameter>
  <se:parameter name="value">Hello world</se:parameter>
 </se:parameters>
</se:text>
 
{string.length('hello world', rem='This viper calculates the length of a string')}