1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<RefEntry id="string-X3Enodes">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename string-X3Enodes.html>
<RefMeta>
<RefEntryTitle>string->nodes</RefEntryTitle>
<RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>
<RefNameDiv>
<RefName>string->nodes</RefName>
<RefPurpose>no documented purpose</RefPurpose>
</RefNameDiv>
<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(string->nodes s)
</Synopsis>
</RefSynopsisDiv>
<RefSect1><Title>Source Code</Title>
<ProgramListing>
(define (string->nodes s)
;; Escape XML characters...
(let* ((achars (string-replace s "&" "&#38;#38;"))
(bchars (string-replace achars "<" "&#38;#60;"))
(cchars (string-replace bchars ">" "&#38;#62;")))
(let ((doc (string-append "<literal><!DOCTYPE doc [ <!ELEMENT "
"doc - - (#PCDATA)> ]><doc>" cchars ";</doc>")))
(children (node-property 'docelem (sgml-parse doc))))))
</ProgramListing>
</RefSect1>
</RefEntry>
|