diff xsls/directive.xsls @ 108:72524ae53106

Explicitly marked directives with the block syntax. Such directives will have curly braces around their syntax and defaults appear automatically. Other directives will have a semicolon after their syntax and defaults.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 20 Oct 2011 07:47:21 +0000
parents 3ae68fe2e938
children d3e240f7157c
line wrap: on
line diff
--- a/xsls/directive.xsls
+++ b/xsls/directive.xsls
@@ -37,6 +37,11 @@ X:stylesheet {
         X:if "count(node()) != 0" {
             X:text{ } !!;
         }
+        X:if "@block = 'yes'" {
+            X:text{ \{ ... \}}
+        } else {
+            X:text{;}
+        }
         </code>
         <br/>
         X:if "position() = last()" {
@@ -69,7 +74,14 @@ X:stylesheet {
             </strong>
         } else {
             <strong>&#8203;</strong>
-            <code> !{../@name} X:text{ } !!; </code>
+            <code>
+            !{../@name}
+            X:if "count(../syntax[@block='yes'])" {
+                X:text{ \{} !!; X:text{\}}
+            } else {
+                X:text{ } !!; X:text{;}
+            }
+            </code>
         }
         <br/>
         X:if "position() = last()" {