<%

'*****************************************************************************
' Microsoft Content Management Server
'
' File: SDReportExportSkippedObjects.INC
'
' Purpose:
'   ASP server-side include file that generates information about those 
'	objects that will be/have been Skipped as a result of an export operation.
'   This file is included by the main report file.
'
'	NOTE: The logic here is basically the same as that in the 
'	SDReportImportDeletedObjects.INC module. The reason the logic is repeated
'	instead of reused is to decouple the deleted objects from the skipped
'	objects should the definitions of either need to change without affecting
'	the other. In addition, it is difficult to reuse the code as the XML
'	tag names are different. Since the grammar parser provides for easy 
'	scripting against an XML object model via IDispatch, it is difficult to
'	determine what tag name we should be using at run-time (on-the-fly).
'
' GLOBAL DEPENDENCIES:
'	pReportXMLTag [in] - the root XML tag of the report XML.
'
'*****************************************************************************


	'*************************************************************************
	' Description:
	'	This function takes a Skipped object XML tag pointer as an argument
	'	and dumps out the object to the output stream.
	'
	' Returns:
	'	None
	'	
	'*************************************************************************
	sub dumpSkippedObject( pSkippedObject )
	
		' Note that ObjectType in the <SkippedObject> tag is string
		Response.Write( "<TR> " & _
						"<TD WIDTH=""20%""> " & _
						getObjectTypeImageTag( MapStringToSDType(pSkippedObject.ObjectType), 0 ) & " " & _
						pSkippedObject.ObjectType & _
						"</TD> " & _
						"<TD> " )
			Response.Write Server.HTMLEncode(pSkippedObject.Location)
			Response.Write Server.HTMLEncode(pSkippedObject.ObjectName) 
			Response.Write( _
						"</TD> " & _
						"</TR>" )
						
	end sub  'dumpSkippedObject
	
	
	'*************************************************************************
	' Description:
	'	This function iterates over the XML-based Skipped object collection,
	'	dumping out a row in a table for each object that it comes across
	'	in the XML. The result is a nicely formatted list of objects that
	'	will be/were Skipped as a result of an Export operation.
	'
	' Returns:
	'	None
	'	
	'*************************************************************************
	sub dumpSkippedObjectsCollection
	
		if pReportXMLTag.SkippedObjects.Count > 0 then

			' double-check that we got back an array. If it is not an array
			' there is only one Skipped object in the XML
			if IsArray( pReportXMLTag.SkippedObjects.SkippedObject ) then
		
				' loop over all the Skipped objects in the collection, dumping
				' them out as we go
				dim pSkippedObject
				for each pSkippedObject in pReportXMLTag.SkippedObjects.SkippedObject
					call dumpSkippedObject( pSkippedObject )
					
				next
				
			else
				call dumpSkippedObject( pReportXMLTag.SkippedObjects.SkippedObject )
				
			end if  'if Skipped object tag is an array
		
		else
			call Response.Write( "<TR> <TD> None </TD> </TR>" )
			
		end if  'if at least one Skipped object
	
	end sub  'dumpSkippedObjectsCollection

%>


<BLOCKQUOTE style="MARGIN-RIGHT: 0px">

	<P>

	<TABLE border="0" cellPadding="1" cellSpacing="1" width="75%">

	<% call dumpSkippedObjectsCollection %>  
	  
	</TABLE>

	</P>
    
</BLOCKQUOTE>
