<?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>$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 )
            
                <m:errorlist>
                    <m:uri>$sf</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> $context_msg </m:context>#end
        #if ( $span_value )
            #set ( $span_class = $error_content.get("span_class_parse_error") )

                            <m:errorsubtype>
                                $span_class
                            </m:errorsubtype>
                            <m:skippedstring>
                                $span_value
                            </m:skippedstring>
        #end

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

                                $before_link :  $link_name ($link_value)
        #end

                                $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 )
            
                    <m:warninglist>
                        <m:uri>$sf</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>$warning.WarningMessage</m:message>
#if ( $warning.Context )
                            <m:context>$warning.Context</m:context>
#end
                        </m:warning>
        #end
    #end
    #if ( $open )
    
                    </m:warninglist>
    #end
#end
                </m:warnings>
        </m:cssvalidationresponse>
    </env:Body>
</env:Envelope>

