<?xml version='1.0' encoding="$charset"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body>
        <m:cssvalidationresponse
            env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"
            xmlns:m="http://www.w3.org/2005/07/css-validator">
            <m:uri>$esc.xml($file_title)</m:uri>
            <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>
            <m:csslevel>$cssversion</m:csslevel>
            <m:date>$currentdate</m:date>
            <m:validity>$is_valid</m:validity>
            <m:result>
                <m:errors xml:lang="$lang">
                    <m:errorcount>$errors_count</m:errorcount>
#set ( $sf = "" )
#if ( $errors_count > 0 )
    #foreach ( $error_content in $errors_content )
        #set ( $err = $error_content.get("Error") )
        #set ( $error_msg = $error_content.get("ErrorMsg") )
        #set ( $class_name = $error_content.get("ClassName") )
        #set ( $context_msg = $error_content.get("CtxMsg") )
        #if ( $error_content.get("link_value_parse_error") )
            #set ( $before_link = $error_content.get("link_before_parse_error") )
            #set ( $link_value = $error_content.get("link_value_parse_error") )
        #else
            #set ( $link_value = false )
        #end
        #if ( $error_content.get("span_value_parse_error") )
            #set ( $span_value = $error_content.get("span_value_parse_error") )
        #else
            #set ( $span_value = false )
        #end
        #if ( $sf != $err.SourceFile )
            #if ( $open )
                    
                    </m:errorlist>
            #end
            #set ( $sf = $err.SourceFile )
            #set ( $sfe = $esc.xml($err.SourceFile) )
            
                <m:errorlist>
                    <m:uri>$sfe</m:uri>
            #set ( $open = true )
        #end
        
                        <m:error>
                            <m:line>$err.Line</m:line>
                            <m:errortype>$class_name</m:errortype>
                            #if ( $context_msg )<m:context>$esc.xml($context_msg)</m:context>#end
        #if ( $span_value )
            #set ( $span_class = $error_content.get("span_class_parse_error") )

                            <m:errorsubtype>
                                $esc.xml($span_class)
                            </m:errorsubtype>
                            <m:skippedstring>
                                $esc.xml($span_value)
                            </m:skippedstring>
                            <m:type>$esc.xml($error_content.get("Type"))</m:type>
        #end

                            <m:message>
        #if ( $link_value )
            #set ( $link_name = $error_content.get("link_name_parse_error") )

                                $before_link :  $esc.xml($link_name) ($esc.xml($link_value))
        #end

                                $esc.xml($error_msg)
                            </m:message>
                        </m:error>
    #end
    #if ( $open )
    
                    </m:errorlist>
    #end
#end
    
                </m:errors>
                <m:warnings xml:lang="$lang">
                    <m:warningcount>$warnings_count</m:warningcount>
#if ( $warnings_count > 0 )
    #set ( $sf = "" )
    #set ( $open = false )
    #foreach ( $warning in $warnings_list )
        #if ( $sf != $warning.SourceFile )
            #if ( $open )
                    
                    </m:warninglist>
            #end
            #set ( $sf = $warning.SourceFile )
            #set ( $sfe = $esc.xml($warning.SourceFile) )
            
                    <m:warninglist>
                        <m:uri>$sfe</m:uri>
            #set ( $open = true )
        #end
        #if ( $warning.Level <= $warning_level )
        
                        <m:warning>
                            <m:line>$warning.Line</m:line>
                            <m:level>$warning.Level</m:level>
                            <m:message>$esc.xml($warning.WarningMessage)</m:message>
#if ( $warning.Context )
                            <m:context>$esc.xml($warning.Context)</m:context>
#end
                            <m:type>$esc.xml($warning.Type)</m:type>
                        </m:warning>
        #end
    #end
    #if ( $open )
    
                    </m:warninglist>
    #end
#end
                </m:warnings>
            </m:result>
        </m:cssvalidationresponse>
    </env:Body>
</env:Envelope>

