<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD><TITLE>[Xerte] Xerte Dynamic Templates tutorial - clarification</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2>I am sorry I did not make myself clear.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2>I understand that the reference to 'value' was a
variable and that duplicate would result in duplication of the icon, what I was
struggling with was </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2>a) the apparent discrepancy between the code in the image
which refers to </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2>icon.nextSibling.childNodes[2]</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2>and the code referred to in the accompanying text which
refers to </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=110273610-16072009><FONT face=Arial
color=#0000ff size=2>icon.nextSibling.firstChild</FONT> </SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff size=2>b)
trying to figure out what icon.nextSibling.childNodes[2] was actually
identifying in the document tree and why that was so.</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2>Similarly I was struggling to figure out, by tracking back up the
document tree how it was that on page 11 in the pdf file (no page number in the
xerte help file, but it is in the section 5 create the template logic
section)</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2>icon.ParentNode.index( )
-2 would return the number
of questions.</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff size=2>Also I
was puzzled by the reference later in the same section to quizData as I was not
sure where this object had been defined.</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff size=2>Is it
the case that since earlier we set templateDate to point to the quiz.xml file
that quizData is effectively the same as templateData?</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff size=2>I am
trying not just to duplicate the actions in the tutorial but to understand them,
so that I can create my own templates.</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff size=2>Kind
regards</FONT></SPAN></DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=110273610-16072009><FONT face=Arial color=#0000ff
size=2>Johnathan</FONT></SPAN></DIV>
<P><FONT face=Arial size=2>Johnathan Kemp<BR>IT Dev. Manager<BR>Connexions
Staffordshire<BR></FONT><A href="http://www.cxstaffs.co.uk/"><FONT face=Arial
size=2>www.cxstaffs.co.uk</FONT></A><BR><FONT face=Arial size=2>01785
355714<BR></FONT></P>
<P> </P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Julian
Tenney<BR><B>Sent:</B> 15 July 2009 20:20<BR><B>To:</B> Xerte discussion
list<BR><B>Subject:</B> RE: [Xerte] Xerte Dynamic Templates tutorial -
clarification<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText80619 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>the parameter just describes
how many times you want to duplicate the icon - don't run it twice!</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>(value) is just a variable, a number, for
how many times you want to duplicate the icon.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on
behalf of Johnathan Kemp<BR><B>Sent:</B> Wed 15/07/2009 17:02<BR><B>To:</B>
Xerte discussion list<BR><B>Subject:</B> [Xerte] Xerte Dynamic Templates
tutorial - clarification<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2> I am part way through the simple quiz example in the
dynamic templates<BR>tutorial as described in the document
XerteDynamicTemplates.pdf<BR><BR>I am following through the example step by step
and trying to ensure<BR>that I understand the logic behind each step, so that I
will then be<BR>able to apply this to creating my own templates.<BR><BR>Can I
seek clarification on the following points?<BR><BR>Page 10<BR>The code uses
icon.nextSibling.childNodes[2].duplicate(quesCount -1)<BR>But the text refers to
icon.nextSibling.firstChild.duplicate(value)<BR><BR>Is this a typing error? Are
both statements required in the code?<BR><BR>Page 11<BR>Why does
icon.parentNode.index( ) - 2 = the number of questions?<BR><BR>Page 12<BR>Where
does the quizData object come from, there appears to be no<BR>previous reference
to it?<BR><BR>And a general question - is there a way of easily identifying
which node<BR>is being referenced at any time by an expression?<BR>E.g. is there
a way of echoing a value for<BR>icon.nextSibling.firstChild.name or
.value<BR><BR>I guess I am looking for any tricks you have picked up along the
way<BR>that aid you in debugging your template creation.<BR><BR>Kind
regards<BR><BR>Johnathan Kemp<BR>IT Dev. Manager<BR>Connexions
Staffordshire<BR>www.cxstaffs.co.uk<BR>01785 355714<BR><BR><BR><BR>This email
and any files transmitted with it are confidential and are intended solely for
the use of the individual(s) or entity(s) to whom they are addressed. All
messages are monitored for virus, high risk files and inappropriate content. As
a result users should be aware that this mail maybe accessed, read and the right
is reserved to reject, return, remove attachments or delete if considered to be
inappropriate or unsuitable. Liability cannot be accepted for any loss or damage
arising from this email (or any attachments) or from scripts or any virus
transmitted.<BR><BR><BR><BR>This communication represents the originator's
personal views and opinions, which do not necessarily reflect those of
Connexions Staffordshire. If you are not the original recipient or the person
responsible for delivering the email to the intended recipient, be advised that
you have received this email in error, and that any use, dissemination,
forwarding, printing, or copying of this email is strictly prohibited. If you
received this email in error, please immediately reply to the sender or notify
postmaster@cxstaffs.co.uk<BR><BR><BR><BR><BR><BR>Connexions Staffordshire
Limited is registered in England No.4355170<BR><BR>Registered office: Foregate
House, 70 Foregate Street, Stafford, Staffordshire, ST16
2PX<BR><BR>_______________________________________________<BR>Xerte mailing
list<BR>Xerte@lists.nottingham.ac.uk<BR><A
href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR></FONT></P></DIV><div align=\"center\" style=\"font-family:verdana; font-size:10px;\"><hr width=\"100%\">This email and any files transmitted with it are confidential and are intended solely for the use of the individual(s) or entity(s) to whom they are addressed. All messages are monitored for virus, high risk files and inappropriate content. As a result users should be aware that this mail maybe accessed, read and the right is reserved to reject, return, remove attachments or delete if considered to be inappropriate or unsuitable. Liability cannot be accepted for any loss or damage arising from this email (or any attachments) or from scripts or any virus transmitted.
This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Connexions Staffordshire. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately reply to the sender or notify postmaster@cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16 2PX</div></body></HTML>