From f12d264778c48de01b1aa28d180c50d677cdf341 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Fri, 19 Apr 2019 19:23:32 -0500 Subject: [PATCH] DOCS: Add some doc strings for the doc function. --- std/xml.ucg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/std/xml.ucg b/std/xml.ucg index 9cc7bbf..d150a1e 100644 --- a/std/xml.ucg +++ b/std/xml.ucg @@ -45,6 +45,10 @@ let is_tag = func(t) => schema.shaped{val=t, shape={name=""}, partial=true}; // validates that a node is either a valid tag or a text node. let validate_node = func(node) => schema.any{val=node, types=["", {name = ""}], partial=true}; +// Make an xml doc from a root node. +// +// The root node must be a valid xml node. Either a text or an +// xml node. let doc = func(root) => select validate_node(root), { true = { root = root,