mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-25 14:06:27 +00:00 
			
		
		
		
	xmldoc: Fix issue with xmlstarlet validation
Added the missing xml-stylesheet and Xinclude namespace declarations in pjsip_config.xml and pjsip_manager.xml. Updated make_xml_documentation to show detailed errors when xmlstarlet is the validator. It's now run once with the '-q' option to suppress harmless/expected messages and if it actually fails, it's run again without '-q' but with '-e' to show the actual errors. Change-Id: I4bdc9d2ea6741e8d2e5eb82df60c68ccc59e1f5e
This commit is contained in:
		| @@ -224,7 +224,8 @@ for subdir in ${mod_subdirs} ; do | ||||
| 			if [ "${XMLLINT}" != ":" ] ; then | ||||
| 				${XMLLINT} --dtdvalid "${source_tree}/doc/appdocsxml.dtd" --path "${source_tree}/doc" --noout "${i}" || { echo "" ; exit 1 ; } | ||||
| 			else | ||||
| 				${XMLSTARLET} val -d "${source_tree}/doc/appdocsxml.dtd" "${i}" || { echo "" ; exit 1 ; } | ||||
| 				${XMLSTARLET} val -q -d "${source_tree}/doc/appdocsxml.dtd" "${i}" || | ||||
| 					${XMLSTARLET} val -e -d "${source_tree}/doc/appdocsxml.dtd" "${i}" || { echo "" ; exit 1 ; } | ||||
| 			fi | ||||
| 		fi | ||||
| 		${SED} -r "/^\s*(<[?]xml|<.DOCTYPE|<.?docs)/d" "${i}" >> "${output_file}" | ||||
| @@ -241,7 +242,8 @@ if [ "${validate}" -eq "1" ] ;then | ||||
| 	if [ "${XMLLINT}" != ":" ] ; then | ||||
| 		${XMLLINT} --dtdvalid "${source_tree}/doc/appdocsxml.dtd" --path "${source_tree}/doc" --noout "${output_file}" || exit 1 | ||||
| 	else | ||||
| 		${XMLSTARLET} val -d "${source_tree}/doc/appdocsxml.dtd" "${output_file}" || exit 1 | ||||
| 		${XMLSTARLET} val -q -d "${source_tree}/doc/appdocsxml.dtd" "${output_file}" || | ||||
| 			${XMLSTARLET} val -e -d "${source_tree}/doc/appdocsxml.dtd" "${output_file}" || { echo "" ; exit 1 ; } | ||||
| 	fi | ||||
| fi | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user