2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_LT := <
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-rock,MB_MAKE_XML_LT,Expanded special char; lesser than.)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_GT := >
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-rock,MB_MAKE_XML_GT,Expanded special char; greater than.)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_CDATA_START := <![CDATA[
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-rock,MB_MAKE_XML_CDATA_START,Expanded special char; XML cdata start.)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_CDATA_END := ]]>
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-rock,MB_MAKE_XML_CDATA_END,Expanded special char; XML cdata end.)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define _escape-xml-attr
|
2024-07-17 11:24:47 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(subst ',',$(subst ","e;,$(subst &,&,$(subst <,<,$(subst >,>,$(subst $(MB_MAKE_XML_CDATA_START),,$(subst $(MB_MAKE_XML_CDATA_END),,$(1))))))))
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define mb-make-xml-open
|
2024-07-17 13:08:25 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(MB_MAKE_XML_LT)$(1)$\
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(2), $(2)$(MB_MAKE_EQUALS)"$(call mb-make-call,_escape-xml-attr,$(3))")$\
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(4), $(4)$(MB_MAKE_EQUALS)"$(call mb-make-call,_escape-xml-attr,$(5))")$\
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(MB_MAKE_XML_GT)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function-deep,mb-make-xml-open,Print xml open tag.,<tag> [attr1-name] [attr1-value] [attr2-name] [attr2-value])
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define mb-make-xml-close
|
2024-07-17 10:46:31 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(MB_MAKE_XML_LT)/$(1)$(MB_MAKE_XML_GT)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function-deep,mb-make-xml-close,Print xml close tag.,<tag>)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define _escape-xml-value
|
2024-07-17 10:46:31 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(subst $(MB_MAKE_XML_CDATA_START),,$(subst $(MB_MAKE_XML_CDATA_END),,$(1)))
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define mb-make-xml-value
|
2024-07-17 13:08:25 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(MB_MAKE_XML_CDATA_START)$\
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,_escape-xml-value,$(1))$\
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(MB_MAKE_XML_CDATA_END)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function-deep,mb-make-xml-value,Print xml value in cdata wrapper.,<value>)
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define mb-make-xml-tag-value
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(2),$(call mb-make-call,mb-make-xml-open,$(1))$(call mb-make-call,mb-make-xml-value,$(2))$(call mb-make-call,mb-make-xml-close,$(1)))
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
2024-07-16 17:32:08 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function-deep,mb-make-xml-tag-value,Print xml tag with value inside.,<tag> [value])
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|