<?xml version="1.0" encoding="UTF-8"?>
<metadoc xmlns="http://metadoc.mobileok"
	xmlns:uri="http://www.w3.org/2006/uri#"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://metadoc.mobileok.com/scheme.xsd">

	<!-- CTIC: We have included an scheme above -->

	<!-- JR: add uri  binding above (it's probably wrong)-->
	<!-- JR: some kind of time sync strucutre needs to go here -->
	<!-- JR: the request/response pairs need to be repeated for each redirection 
		plus need timestamps on the requests
		plus need to be able to signal somehow that the response was not HTTP or that the connection failed
		plus I suggest wrapping each request response pair in a <request> element 
		plus I'd like to see this wrapper element include the RAW HTTP responses (though don't particularly feel the need to
		see the request :-) -->
	<HTTPConnection>
		<request>
			<uri:uri>http://arandomdocument.net/</uri:uri>
			<version>1.1</version>

			<!-- JR: I'd prefer to see the following decomposed into XML elements and attributes, maybe something like what I proposed on the list -->

			<!--CTIC: We think that the request is not going to be processed,so would be necessary to split it? -->
			<accept>
				application/xhtml+xml,text/html;q=0.1,application/vnd.wap.xhtml+xml;q=0.1,text/css,image/jpeg,image/gif
			</accept>
			<accept-charset>UTF-8</accept-charset>
			<user-agent>
				W3C mobileOK DDC
				(http://www.w3.org/2006/07/mobileok-ddc)
			</user-agent>
		</request>
		<!--JR: need to be able to say if the connection failed ... -->
		<!-- CTIC:Also see error sample documents ( error_TCP.xml; error_HTTP.xml)  -->

		<!-- CTIC: Do we really need to trace all redirections or just the last response 
			and the number of redirections? -->
		<response result="true" start="time" end="time"
			redirections="2">
			<responseCode>200</responseCode>
			<date>Thu, 01 Mar 2007 19:05:29 GMT</date>
			<pragma>no-cache</pragma>
			<content-type>text/vnd.wap.wml; charset=UTF-8</content-type>
			<server>Apache</server>
			<transfer-encoding>chunked</transfer-encoding>
			<cache-control>no-cache</cache-control>
			<!-- JR: not keen on base 64 personally but anyway ... insert the raw text of the headers and add a size attribute to both the following-->

			<headers size="12345">
				<!-- CTIC: Is preferible decompose headers like this? -->
				<header name="date">
					Thu,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yY2giIG1ldGhvZD0iZ2V0Ij4gPHBvc3RmaWVsZCBuYW1lPSJtcmVzdHJpY3QiIHZhbHVlPSJ3bWwiLz4gPHBvc3RmaWVsZCBuYW1lPSJxIiB2YWx1ZT0iJChxKSIvPiA8cG9zdGZpZWxkIG5hbWU9InNpdGUiIHZhbHVlPSJtb2JpbGUiLz4gPC9nbz5Nb2JpbGUgV2ViIDwvYW5jaG9yPiA8YnIvPiA8YW5jaG9yIHRpdGxlPSJsb2NhbCI+IDxnbyBocmVmPSIvbS9zZWFyY2giIG1ldGhvZD0iZ2V0Ij4gPHBvc3RmaWVsZCBuYW1lPSJtcmVzdHJpY3QiIHZhbHVlPSJ3bWwiLz4gPHBvc3RmaWVsZCBuYW1lPSJxIiB2YWx1ZT0iJChxKSIvPiA8cG9zdGZpZWxkIG5hbWU9InNpdGUiIHZhbHVlPSJsb2NhbCIvPiA8L2dvPkxvY2FsIGxpc3RpbmdzIDwvYW5jaG9yPiA8L3A+IDxwPiAgPGEgaHJlZj0iL20/bXJlc3RyaWN0PXhodG1sJmFtcDtwcmVmPWQiPlByZWZlcmVuY2VzIDwvYT4gPGJyLz4gPGEgaHJlZj0iL20vaGVscD9tcmVzdHJpY3Q9eGh0bWwiPkhlbHAgJmFtcDsgVGVybXMgPC9hPiA8YnIvPiYjMTY5OzIwMDcgR29vZ2xlIDxici8+IDwvcD4gPC9jYXJkPiA8L3dtbD4K]]>
			</body>
		</response>
	</HTTPConnection>
	<!-- Third parties tools -->
	<tools>
		<tidy>
			<name>Tidy</name>
			<version>1.0</version>
			<!-- other information is possible  JR: agree, e.g. a URI -->
			<!-- CTIC: Yes,to be defined-->
		</tidy>
		<!-- Also include image tools ... -->
		<!-- JR: and UTF-8 checker, and CSS checker and JPG checker and GIF checker and XML validator -->
		<!-- CTIC: absolutely agree -->
	</tools>

	<documentInfo>
		<!-- JR: think we need to capture both the xmlheader and the doctype - 
			as they are not included below  -->
		<XMLdecl version="1.0" encoding="UTF-8" />
		<doctypedecl>-//WAPFORUM//DTD XHTML Mobile 1.0//EN</doctypedecl>
		<!-- JR: not sure what you mean by the following -  need to indicate whether it is valid utf-8 or not - I'm not sure we
			care what charset has heuristically been determinded-->

		<!-- CTIC: We think that it would be better having the inferred  encoding,and checking if this is 
			supported or not.This is because of extensibilty( in the future  others encondings could be supported )
			Also we have added all the specified encodings -->
		<encodings>
			<responseHeaderEncoding>UTF-8</responseHeaderEncoding>
			<xmlEncoding>UTF-8</xmlEncoding>
			<metaEncoding></metaEncoding>
			<inferredEncoding>UTF-8</inferredEncoding>
			<!-- Should we include the supported enconding(s)? -->
		</encodings>

		<!-- JR: I think the size would better be pur in the request / response info (allows 
			the size to be presented in the same way for all request and allows totalling of bytes transferred if you want to-->
		<!-- CTIC:We haven't anything against this :) -->


		<grammar valid="false" wellformed="false">
			<error>
				<!-- different addressing methods (lineNumber in source doc,xPath -->
				<location type="lineNumber">
					<line>13</line>
					<!-- useful for i18n-->
					<code>123</code>
				</location>
			</error>
		</grammar>

		<!-- JR:I think the resources are better specified as explicit requests per my suggestion below -->
		<!-- CTIC: Ok -->

	</documentInfo>

	<!-- All css info is in the resources section -->

	<!-- Source XHTML code with meta info inline-->
	<!-- JR: this is the tidied doc? [the original if if didn't need tidying] -->
	<!-- CTIC: Yes -->
	<!-- think it would be easier just to include the html with a ns on the html element. Avoid quoting the prefix everywhere -->
	<!-- CTIC:Yes,of course :) -->
	<document>

		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<style type="text/css">body {padding:3px;}</style>

				<link href="style.css" type="text/css" rel="stylesheet" />
				<meta http-equiv="refresh"
					content="http://arandomdocument.net" />
				<title>MyPage</title>
			</head>
			<body>
				<!-- THIS META IS NOT NEEDED ANY MORE??-->
				<img id="logo" title="Laboratory" width="100"
					height="56" src="lila.gif" />


				<h1>Quality Assurance</h1>
				<h3 id="user">User</h3>

				<ul>
					<li class="inf">Last Information</li>
					<li class="inf">Registered Data</li>
					<li class="inf">Charts</li>
				</ul>
			</body>
		</html>
	</document>

	<!-- JR: now inlcude all the details for the image requests and the stylesheet requests and the external link requests -->

	<!--CTIC: The element HTTPConnection would be the same as the used to trace
		the request of the main document -->
	<images>
		<!-- CTIC: Absolute vs Relative path??
			http://arandomdocument.net/lila.gif" -->
		<image uri="lila.gif">
			<HTTPConnection>...</HTTPConnection>
			<!--CTIC: what is the meaning of this valid? -->
			<imageinfo valid="true" size="1575" content-type='image/gif'
				width='150px' height='80px' depth='256' transparent="false" />
		</image>
	</images>
	<!-- JR: I'm suggesting we need to do a HTTP trace on the request for each external stylesheet so some of this stuff would better 
		be done below? the inline <style> element and the "style" attribute should remain here though, I guess -->

	<!-- CTIC:How is treated an @import rule?
		We think that the css will be our big problem:(  -->
	<stylesheets>
		<!-- we need to indicate the type of css:(linked,imported,block style)-->

		<stylesheet type="linked">
			<HTTPConnection>...</HTTPConnection>

			<stylesheetinfo location="xPath to the link tag">
				<grammar valid="true" wellformed="true" />
				<encodings>
					<responseHeaderEncoding>
						UTF-8
					</responseHeaderEncoding>
					<charsetEncoding>UTF-8</charsetEncoding>
					<inferredEncoding>UTF-8</inferredEncoding>
					<!-- Should we include the supported enconding(s)? -->
				</encodings>
				<!--
					<!-- Info about css stylesheetssuppor test -->
				<stylesheetssuppor>
					<warn>
						<location type="lineNumber">
							<line>5</line>
							<code>40</code>
						</location>
					</warn>
					<warn>
						<location type="lineNumber">
							<line>5</line>
							<code>41</code>
						</location>
					</warn>
				</stylesheetssuppor>
				<!-- Info about css measures test -->
				<measures />
			</stylesheetinfo>
		</stylesheet>
		<stylesheet type="embedded">
			<stylesheetinfo location="xPath Expr to the tidied doc">
				<grammar valid="false" wellformed="true">
					<error>
						<location type="lineNumber">
							<line>7</line>
							<code>50</code>
						</location>
					</error>
				</grammar>
				<!--would be this redundant?  -->
				<encodings>
					<responseHeaderEncoding>
						UTF-8
					</responseHeaderEncoding>
					<charsetEncoding>UTF-8</charsetEncoding>
					<inferredEncoding>UTF-8</inferredEncoding>
					<!-- Should we include the supported enconding(s)? -->
				</encodings>

				<stylesheetssuppor />
				<measures />
			</stylesheetinfo>
		</stylesheet>

		<!-- CTIC:Should we include only the failed inline css info?  -->
		<stylesheet type="inline">
			<stylesheetinfo location="xPath Expr to the tidied doc">
				<grammar valid="true" wellformed="true" />

			</stylesheetinfo>

			<stylesheetinfo location="xPath Expr to the tidied doc">
				....
			</stylesheetinfo>
		</stylesheet>
	</stylesheets>

	<hyperlinks>
		<hyperlink uri="home.html">
			<HTTPConnection>...</HTTPConnection>
		</hyperlink>
	</hyperlinks>

</metadoc>