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

  $Author: richard $

  $Revision: 1.8 $

  $Log: 6,v $
  Revision 1.8  2002/04/25 14:14:19  richard
  / of the wml:cardin the wron location

  Revision 1.7  2002/04/23 10:27:59  richard
  missing an extra / in the go element

  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:47:19  richard
  include the external deck, redisplay the cards

  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/6" class="A" scope="wml2" 
	testtype="application" type="auto" source="wml2#5.3.2" device="both">
  <assertion>When the WML:PREV task is executed, and the WML:USE-XML-FRAGMENTS 
  attribute is 'true', and the document contains a matching element ID attribute, 
  the fragment identifier of the target URI must be the card that holds that 
  element with the matching ID.
  </assertion>
  <specnote>Create a document that contains a link to a second document. Set 
  the WML:USE-XML-FRAGMENTS attribute to 'true'. The second document must hold 
  a WML:PREV task so that the user can navigate back to the first document. Call
  the first document with a URL containing a fragment identifier that matches 
  the ID of an element contained within that document. Navigate to the second 
  document, then press the back button and make sure you are taken to the card 
  that contains the element with the ID matching that of the fragment identifier.
  </specnote>
  <results>
    <result ci="true">
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
		<![CDATA[
  		<wml:card newcontext="true" id="main" title="main">
    		<wml:onevent type="enterforward">
        	<wml:go href="[[page1]]" />
      	</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 6</title>
					</head>
					<wml:card id="card1" title="card1">
						<wml:onevent type="enterforward">
							<wml:go href="#pass" />
						</wml:onevent>
						<wml:onevent type="enterbackward">
							<wml:go href="[[resulturl]]">
								<wml:postfield name="test" value="pass" />
								[[sessionvars]]
							</wml:go>
						</wml:onevent>
						[[auto_failed]]
					</wml:card>
					<wml:card id="card2" title="card2">
						<p>You shouldn't be there</p>
						[[auto_failed]]
					</wml:card>
					<wml:card id="card3" title="card3">
						<wml:onevent type="enterforward">
							<wml:prev />
						</wml:onevent>
						<p id="pass">This is card3.<br />
							fragment #pass
						</p>
						[[auto_failed]]
					</wml:card>
				</html>
			]]>
		</page>
	</pages>
</test>
