diff options
Diffstat (limited to 'doc/manual.tex')
-rw-r--r-- | doc/manual.tex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/manual.tex b/doc/manual.tex index c9920a66..067d5aa4 100644 --- a/doc/manual.tex +++ b/doc/manual.tex @@ -1838,6 +1838,11 @@ $$\begin{array}{l} \mt{val} \; \mt{cdata} : \mt{ctx} ::: \{\mt{Unit}\} \to \mt{use} ::: \{\mt{Type}\} \to \mt{string} \to \mt{xml} \; \mt{ctx} \; \mt{use} \; [] \end{array}$$ +There is also a function to insert the literal value of a character. Since Ur/Web uses the UTF-8 text encoding, the $\mt{cdata}$ function is only sufficient to encode characters with ASCII codes below 128. Higher codes have alternate meanings in UTF-8 than in usual ASCII, so this alternate function should be used with them. +$$\begin{array}{l} + \mt{val} \; \mt{cdataChar} : \mt{ctx} ::: \{\mt{Unit}\} \to \mt{use} ::: \{\mt{Type}\} \to \mt{char} \to \mt{xml} \; \mt{ctx} \; \mt{use} \; [] +\end{array}$$ + There is a function for producing an XML tree with a particular tag at its root. $$\begin{array}{l} \mt{val} \; \mt{tag} : \mt{attrsGiven} ::: \{\mt{Type}\} \to \mt{attrsAbsent} ::: \{\mt{Type}\} \to \mt{ctxOuter} ::: \{\mt{Unit}\} \to \mt{ctxInner} ::: \{\mt{Unit}\} \\ |