Mercurial > urweb
comparison doc/manual.tex @ 1358:32c8a3509369
Basis.cdataChar
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 21 Dec 2010 18:01:23 -0500 |
parents | 977901cb52cc |
children | b2bc8bcd546f |
comparison
equal
deleted
inserted
replaced
1357:a0f0823a54a0 | 1358:32c8a3509369 |
---|---|
1836 Literal text may be injected into XML as ``CDATA.'' | 1836 Literal text may be injected into XML as ``CDATA.'' |
1837 $$\begin{array}{l} | 1837 $$\begin{array}{l} |
1838 \mt{val} \; \mt{cdata} : \mt{ctx} ::: \{\mt{Unit}\} \to \mt{use} ::: \{\mt{Type}\} \to \mt{string} \to \mt{xml} \; \mt{ctx} \; \mt{use} \; [] | 1838 \mt{val} \; \mt{cdata} : \mt{ctx} ::: \{\mt{Unit}\} \to \mt{use} ::: \{\mt{Type}\} \to \mt{string} \to \mt{xml} \; \mt{ctx} \; \mt{use} \; [] |
1839 \end{array}$$ | 1839 \end{array}$$ |
1840 | 1840 |
1841 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. | |
1842 $$\begin{array}{l} | |
1843 \mt{val} \; \mt{cdataChar} : \mt{ctx} ::: \{\mt{Unit}\} \to \mt{use} ::: \{\mt{Type}\} \to \mt{char} \to \mt{xml} \; \mt{ctx} \; \mt{use} \; [] | |
1844 \end{array}$$ | |
1845 | |
1841 There is a function for producing an XML tree with a particular tag at its root. | 1846 There is a function for producing an XML tree with a particular tag at its root. |
1842 $$\begin{array}{l} | 1847 $$\begin{array}{l} |
1843 \mt{val} \; \mt{tag} : \mt{attrsGiven} ::: \{\mt{Type}\} \to \mt{attrsAbsent} ::: \{\mt{Type}\} \to \mt{ctxOuter} ::: \{\mt{Unit}\} \to \mt{ctxInner} ::: \{\mt{Unit}\} \\ | 1848 \mt{val} \; \mt{tag} : \mt{attrsGiven} ::: \{\mt{Type}\} \to \mt{attrsAbsent} ::: \{\mt{Type}\} \to \mt{ctxOuter} ::: \{\mt{Unit}\} \to \mt{ctxInner} ::: \{\mt{Unit}\} \\ |
1844 \hspace{.1in} \to \mt{useOuter} ::: \{\mt{Type}\} \to \mt{useInner} ::: \{\mt{Type}\} \to \mt{bindOuter} ::: \{\mt{Type}\} \to \mt{bindInner} ::: \{\mt{Type}\} \\ | 1849 \hspace{.1in} \to \mt{useOuter} ::: \{\mt{Type}\} \to \mt{useInner} ::: \{\mt{Type}\} \to \mt{bindOuter} ::: \{\mt{Type}\} \to \mt{bindInner} ::: \{\mt{Type}\} \\ |
1845 \hspace{.1in} \to \lambda [\mt{attrsGiven} \sim \mt{attrsAbsent}] \; [\mt{useOuter} \sim \mt{useInner}] \; [\mt{bindOuter} \sim \mt{bindInner}] \\ | 1850 \hspace{.1in} \to \lambda [\mt{attrsGiven} \sim \mt{attrsAbsent}] \; [\mt{useOuter} \sim \mt{useInner}] \; [\mt{bindOuter} \sim \mt{bindInner}] \\ |