"".
process_xml(Doc)->
template(Doc).
template(E = #xmlElement{name='doc'})->
[ "<\?xml version=\"1.0\" encoding=\"iso-8859-1\"\?>",
doctype(),
""
""
"", value_of(select("title",E)), ""
""
"",
xslapply( fun template/1, E),
""
"" ];
template(E = #xmlElement{ parents=[{'doc',_}|_], name='title'}) ->
["",
xslapply( fun template/1, E),
"
"];
template(E = #xmlElement{ parents=[{'chapter',_}|_], name='title'}) ->
["",
xslapply( fun template/1, E),
"
"];
template(E = #xmlElement{ parents=[{'section',_}|_], name='title'}) ->
["",
xslapply( fun template/1, E),
"
"];
template(E = #xmlElement{ name='para'}) ->
["", xslapply( fun template/1, E), "
"];
template(E = #xmlElement{ name='note'}) ->
[""
"NOTE: ",
xslapply( fun template/1, E),
"
"];
template(E = #xmlElement{ name='emph'}) ->
["", xslapply( fun template/1, E), ""];
template(E)->
built_in_rules( fun template/1, E).
]]>