Commit 55007fbe authored by gerd's avatar gerd

upd


git-svn-id: https://godirepo.camlcity.org/svn/app-presentation/trunk@25 50e5f3cf-a9f2-0310-83d8-d11ec64cb5ab
parent 012df573
......@@ -94,14 +94,20 @@
<!ELEMENT sect1 (title*,(sect2|%p.like;)+)>
<!-- Layout customizable: CHILDREN, TITLE, GIFURL, LANG -->
<!ATTLIST sect1 lang CDATA #IMPLIED>
<!ELEMENT sect2 (title*,(sect3|%p.like;)+)>
<!-- Layout customizable: CHILDREN, TITLE, GIFURL, LANG -->
<!ATTLIST sect2 lang CDATA #IMPLIED>
<!ELEMENT sect3 (title*,(%p.like;)+)>
<!-- Layout customizable: CHILDREN, TITLE, GIFURL, LANG -->
<!ATTLIST sect3 lang CDATA #IMPLIED>
<!ELEMENT title (#PCDATA|br)*>
<!ATTLIST title lang CDATA #IMPLIED>
......
......@@ -1237,22 +1237,32 @@ class section the_tag =
val tag = the_tag
method private language =
(* Determine the language of the element *)
match self # node # optional_string_attribute "lang" with
| None -> `Any
| Some l -> `Lang l
method to_html ~lang store idx =
let title = title_of_node ~lang self # node in
let children =
map'n'concat
(fun n -> n # extension # to_html ~lang store idx)
self#node#sub_nodes
in
let text =
store # instantiate_layout tag
~lang
[ "TITLE", lazy title;
"CHILDREN", lazy children;
"GIFURL", lazy (escape_html(store # get_gif title tag))
]
in
text
let taglang = self # language in
if taglang = `Any || taglang = lang then (
let title = title_of_node ~lang self # node in
let children =
map'n'concat
(fun n -> n # extension # to_html ~lang store idx)
self#node#sub_nodes
in
let text =
store # instantiate_layout tag
~lang
[ "TITLE", lazy title;
"CHILDREN", lazy children;
"GIFURL", lazy (escape_html(store # get_gif title tag))
]
in
text
)
else ""
end
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment