-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoc.p
More file actions
28 lines (20 loc) · 794 Bytes
/
Doc.p
File metadata and controls
28 lines (20 loc) · 794 Bytes
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
###########################################################################
# $Id: Doc.p,v 1.4 2010-03-01 00:37:37 misha Exp $
###########################################################################
@CLASS
Als/Utils/Doc
###########################################################################
# print $xDoc as string without DOCTYPE and XML declaration
@toString[xDoc]
$result[^xDoc.string[
$.omit-xml-declaration[yes]
$.indent[no]
]]
$result[^result.match[<!DOCTYPE[^^>]+>\s*][i]{}]
$result[^result.trim[]]
#end @toString[]
###########################################################################
@create[sXML;hParam]
$result[^xdoc::create{<?xml version="1.0" encoding="^if(def $hParam && def $hParam.sCharset){$hParam.sCharset}{$request:charset}"?>
$sXML}]
#end @create[]