Example #1
0
int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params)
{
	struct oscap_source *source = oscap_source_new_from_file(xmlfile);
	int ret = oscap_source_apply_xslt_path(source, xsltfile, outfile, params, oscap_path_to_xslt());
	oscap_source_free(source);
	return ret;
}
Example #2
0
char *ds_sds_session_get_html_guide(struct ds_sds_session *session, const char *profile_id)
{
	const char *params[] = {
		"show", "",
		"verbosity", "",
		"hide-profile-info", NULL,
		"oscap-version", oscap_get_version(),
		"pwd", NULL,
		"profile_id", profile_id,
		NULL
	};
	struct oscap_source *xccdf = oscap_htable_get(session->component_sources, "xccdf.xml");
	if (xccdf == NULL) {
		oscap_seterr(OSCAP_EFAMILY_OSCAP, "Internal error: Could not acquire handle to xccdf.xml source.");
	}
	return oscap_source_apply_xslt_path_mem(xccdf, "xccdf-guide.xsl", params, oscap_path_to_xslt());
}
Example #3
0
char *ds_rds_session_get_html_report(struct ds_rds_session *rds_session)
{
	const char *params[] = {
		"show",              "",
		"verbosity",         "",
		"hide-profile-info", NULL,
		"oscap-version",     oscap_get_version(),
		"pwd",               NULL,
		NULL
        };
	return oscap_source_apply_xslt_path_mem(rds_session->source, "xccdf-report.xsl", params, oscap_path_to_xslt());
}