<?xml version="1.0" encoding="UTF-8"?>
<!--

  $Author: richard $

  $Revision: 1.9 $

  $Log: 8,v $
  Revision 1.9  2002/06/16 09:54:58  richard
  wrong access cardm card3 instead of card2

  Revision 1.8  2002/04/26 09:00:45  richard
  xml not well formed

  Revision 1.7  2002/04/20 09:04:06  richard
  yesno

  Revision 1.6  2002/04/19 16:13:22  richard
  autofailed, missing / or extra / on wml:carcd element
  move the fragment into a page document

  Revision 1.5  2002/03/26 16:51:33  richard
  ncludes the externam deck

  Revision 1.4  2002/02/27 14:57:04  richard
  rewrite tests,correct bug, pass as auto

  Revision 1.3  2001/10/30 16:22:51  gb
  Modified all the test files in the wml2 directory such that it puts the <?xml?> declaration back at the top of the file, before the comment.

  Revision 1.2  2001/10/08 21:56:28  gb
  Added the standard header of Author, Revision and Log at the top of each template file.


-->
<test id="wml2/uabehaviour/navigationreference/prevtask/8" class="A" scope="wml2" 
	testtype="application" type="manual" source="wml2#5.3.2" device="both">
  <assertion>When the WML:PREV task is executed(to navigate to a card in the 
  same document), and the WML:USE-XML-FRAGMENTS attribute is 'true', and the 
  document contains no matching element ID attribute, the fragment identifier 
  of the target URI must be the first card in that document.
  </assertion>
  <specnote>Create a document that contains at least two cards(card1 &amp; card2), 
  and sets the WML:USE-XML-FRAGMENTS to 'true'. Card2 could hold a link to card1. 
  First call the document using a fragment identifier that does not match a 
  element ID, then click the link to go to card2(card2 will contain the 
  WML:PREV task). Next click the back button and make sure you are taken back to
  the first card in the document.
  </specnote>
  <results>
    <result>
      <name>submit</name>
      <value>yes</value>
    </result>
  </results>
  <method>
		<![CDATA[
  		<wml:card newcontext="true" id="main" title="main">
    		<wml:onevent type="enterforward">
        	<wml:go href="[[page1]]#dummy" />
    		</wml:onevent>
				[[auto_failed]]
 			</wml:card>
 		]]>
  </method>
   <pages>
    <page id="1">
			<![CDATA[
				<?xml version="1.0" encoding="UTF-8"?>
				<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD WML 2.0//EN" "http://www.wapforum.org/wml20.dtd">
				<html xmlns="http://www.w3.org/1999/xhtml"
					xmlns:wml="http://www.wapforum.org/2001/wml"
					wml:use-xml-fragments="true">
					<head>
						<title>prev task 4</title>
					</head>
					<wml:card id="card1" title="card1">
						<p>
							This is card1 and the first card in this document.<br />
							Click this &nbsp;<a href="#card2">link</a>&nbsp;
							to go to card2, then press the back button to return here.
						</p>
						<p>When pressing the back button in card2, were you taken back to card1?
							<br/>
							[[yesno]]
						</p>
					</wml:card>
					<wml:card id="card2" title="card2">
						<wml:do type="prev">
							<wml:prev />
						</wml:do>
						<p>This is card2.<br />
							now go back
						</p>
					</wml:card>
				</html>
			]]>
		</page>
	</pages>
</test>
