2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_LT := <
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_XML_LT,"Expanded special char; lesser than.")
|
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_GT := >
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_XML_GT,"Expanded special char; greater than.")
|
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_CDATA_START := <![CDATA[
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_XML_CDATA_START,"Expanded special char; XML cdata start.")
|
|
|
|
|
|
|
|
|
|
MB_MAKE_XML_CDATA_END := ]]>
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_XML_CDATA_END,"Expanded special char; XML cdata end.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define _escape_xml_attr
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(subst <,\u0026lt\u003B,$(subst >,\u003Cgt\u003B,$(subst $(MB_MAKE_XML_CDATA_START),,$(subst $(MB_MAKE_XML_CDATA_END),,$(1)))))
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
|
|
|
|
define mb_make_xml_open
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )"$(MB_MAKE_XML_LT)"$(1)$(if $(2), $(2)$(MB_MAKE_EQUALS)\"$(call mb_make_call,_escape_xml_value,$(3))\")$(if $(4), $(4)$(MB_MAKE_EQUALS)\"$(call mb_make_call,_escape_xml_attr,$(5))\")"$(MB_MAKE_XML_GT)"
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
|
|
|
|
$(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]")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define mb_make_xml_close
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )"$(MB_MAKE_XML_LT)"/$(1)"$(MB_MAKE_XML_GT)"
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_xml_close,"Print xml close tag.","<tag>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define _escape_xml_value
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(subst <,\u003C,$(subst >,\u003E,$(subst $(MB_MAKE_XML_CDATA_START),,$(subst $(MB_MAKE_XML_CDATA_END),,$(1)))))
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
|
|
|
|
define mb_make_xml_value
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )"$(MB_MAKE_XML_CDATA_START)"$(call mb_make_call,_escape_xml_value,$(1))"$(MB_MAKE_XML_CDATA_END)"
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_xml_value,"Print xml value in cdata wrapper.","<value>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define mb_make_xml_tag_value
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(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
|
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_xml_tag_value,"Print xml tag with value inside.","<tag> [value]")
|
|
|
|
|
|