ZedAI XForms QTI Example 1

From zedwiki

Jump to: navigation, search

Example 1 (IRS Form W-4 2009)

Image:Formw-4.jpg

XForms

<html xmlns="http://www.w3.org/2002/06/xhtml2/" 
  xmlns:xforms="http://www.w3.org/2002/xforms" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:ev="http://www.w3.org/2001/xml-events" 
  xmlns:my="SYSTEM">
  <head>
    <title>Form W-4 Employee's Withholding Allowance Certificate (Partial)</title>
    <xforms:model>
      <xforms:instance>
        <my:form>
          <my:worksheet>
            <my:itema/>
            <my:itemb/>
            <my:itemc/>
            <my:itemd/>
            <my:iteme/>
            <my:itemf/>
            <my:itemg/>
            <my:itemh/>
          </my:worksheet>
          <my:q1>
            <my:fname/>
            <my:lname/>
            <my:homeaddr/>
            <my:citystatezip/>
          </my:q1>
          <my:q2/>
          <my:q3/>
          <my:q4/>
          <my:q5/>
          <my:q6/>
          <my:q7/>
          <my:q8/>
          <my:q9/>
          <my:q10/>
          <my:declare>
            <my:signature/>
            <my:date/>
          </my:declare>
        </my:form>
      </xforms:instance>
      <xforms:bind nodeset="my:form/my:worksheet" relevant="false()"/>
      <xforms:bind nodeset="my:form/my:q5" relevant="my:form/my:worksheet/my:itemh"
        calculate="my:form/my:worksheet/my:itemh"/>
      <xforms:submission action="FormW-4.xml" method="put" ref="/my:form" />
    </xforms:model>
  </head>
  <body>
    <section>
      <h>Personal Allowances Worksheet (Keep for your records.)</h>
      <ol>
        <li>Enter "1" for yourself if no one else can claim you as a dependent
          <xforms:input ref="my:form/my:worksheet/my:itema">
            <xforms:label>A</xforms:label>
          </xforms:input>
        </li>
        <li>Enter "1" if:
          <ul>
            <li>You are single and have only one job; or</li>
            <li>You are married, have only one job, and your spouse does not 
              work; or</li>
            <li>Your wages from a second job or your spouse's wages (or the
              total of both) are $1,500 or less.</li>
          </ul>
          <xforms:input ref="my:form/my:worksheet/my:itemb">
            <xforms:label>B</xforms:label>
          </xforms:input>
        </li>
        <li>Enter "1" for spouse. But, you may choose to enter "-0-" if you are married
          and have either a working spouse or more than one job. (Entering "-0-" may 
          help you avoid having too little tax withheld.)
          <xforms:input ref="my:form/my:worksheet/my:itemc">
            <xforms:label>C</xforms:label>
          </xforms:input>
        </li>
        <li>Enter number of dependents (other than your spouse or yourself) you will 
          claim on your tax return
          <xforms:input ref="my:form/my:worksheet/my:itemd">
            <xforms:label>D</xforms:label>
          </xforms:input>
        </li>
        <li>Enter "1" if you will file as head of household on your tax return (see 
          conditions under Head of household above)
          <xforms:input ref="my:form/my:worksheet/my:iteme">
            <xforms:label>E</xforms:label>
          </xforms:input>
        </li>
        <li>Enter "1" if you have at least $1,800 of child or dependent care expenses
          for which you plan to claim a credit (Note. Do not include child support
          payments. See Pub. 503, Child and Dependent Care Expenses, for details.)
          <xforms:input ref="my:form/my:worksheet/my:itemf">
            <xforms:label>F</xforms:label>
          </xforms:input>
        </li>
        <li>Child Tax Credit (including additional child tax credit). See Pub. 972, 
          Child Tax Credit, for more information.
          <ul>
            <li>If your total income will be less than $61,000 ($90,000 if married),
              enter "2" for each eligible child; then less "1" if you have 
              three or more eligible children.</li>
            <li>If your total income will be between $61,000 and $84,000 ($90,000
              and $119,000 if married), enter "1" for each eligible child 
              plus "1" additional if you have six or more eligible children.</li>
          </ul>
          <xforms:input ref="my:form/my:worksheet/my:itemg">
            <xforms:label>G</xforms:label>
          </xforms:input>
        </li>
        <li>
          <p>Add lines A through G and enter total here. (Note. This may be different 
          from the number of exemptions you claim on your tax return.)</p>
          <p>For accuracy, complete all worksheets that apply.</p>
          <ul>
            <li>If you plan to itemize or claim adjustments to income and want to 
              reduce your withholding, see the Deductions and Adjustments
              Worksheet on page 2.</li>
            <li>If you have more than one job or are married and you and your spouse
              both work and the combined earnings from all jobs exceed $40,000
              ($25,000 if married), see the Two-Earners/Multiple Jobs Worksheet
              on page 2 to avoid having too little tax withheld.</li>
            <li>If neither of the above situations applies, stop here and enter the 
              number from line H on line 5 of Form W-4 below.</li>
          </ul>
          <xforms:input ref="my:form/my:worksheet/my:itemh">
            <xforms:label>H</xforms:label>
          </xforms:input>
        </li>
      </ol>
    </section>
    <section>
      <h>Form W-4 Employee's Withholding Allowance Certificate 2009</h>
      <p>CMB No. 1545-0074</p>
      <p>Department of the Treasury</p>
      <p>Internal Revenue Service</p>
      <p>Whether you are entitled to claim a certain number of allowances or exemption from 
        withholding is subject to review by the IRS. Your employer may be required to send a 
        copy of this form to the IRS.</p>
      <ol>
        <li>
          <xforms:input ref="my:form/my:q1/my:fname">
            <xforms:label>Type or print your first name and middle initial.</xforms:label>
          </xforms:input>
          <xforms:input ref="my:form/my:q1/my:lname">
            <xforms:label>Last name</xforms:label>
          </xforms:input>
          <xforms:input ref="my:form/my:q1/my:homeaddr">
            <xforms:label>Home address (number and street or rural route)</xforms:label>
          </xforms:input>
          <xforms:input ref="my:form/my:q1/my:citystatezip">
            <xforms:label>City or town, state, and ZIP code</xforms:label>
          </xforms:input>
        </li>
        <li>
          <xforms:input ref="my:form/my:q2">
            <xforms:label>Your social security number</xforms:label>
          </xforms:input>
        </li>
        <li>
          <xforms:select1 ref="my:form/my:q3">
            <xforms:label>Marital status</xforms:label>
            <xforms:item>
              <xforms:label>Single</xforms:label>
              <xforms:value>single</xforms:value>
            </xforms:item>
            <xforms:item>
              <xforms:label>Married</xforms:label>
              <xforms:value>married</xforms:value>
            </xforms:item>
            <xforms:item>
              <xforms:label>Married, but withhold at higher Single rate.</xforms:label>
              <xforms:value>marriedexception</xforms:value>
            </xforms:item>
          </xforms:select1>
          Note. If married, but legally separated, or spouse is a nonresident alien, check
            the "Single" box.
        </li>
        <li>
          <xforms:input ref="my:form/my:q5">
            <xforms:label>Total number of allowances you are claiming (from line 
              H above or from the applicable worksheet on page 2)</xforms:label>
          </xforms:input>
        </li>
        <li>
          <xforms:input ref="my:form/my:q6">
            <xforms:label>Additional amount, if any, you want withheld from each 
              paycheck</xforms:label>
          </xforms:input>
        </li>
        <li>I claim exemption from withholding for 2009, and I certify that I meet both of the 
          following conditions for exemption.
          <ul>
            <li>Last year I had a right to a refund of all federal income tax withheld
              because4 I had no tax liability and</li>
            <li>This year I expect a refund of all federal income tax withheld because 
              I expect to have no tax liability.</li>
          </ul>
          <xforms:input ref="my:form/my:q7">
            <xforms:label>If you meet both conditions, write "Exempt" here</xforms:label>
          </xforms:input>
        </li>
      </ol>
      <p>Under penalties of perjury, I declare that I have examined this certificate and to the best
        of my knowledge and belief, it is true, correct, and complete.</p>
      <p>
        <xforms:input ref="my:form/my:declare/my:signature">
          <xforms:label>Employee's signature (Form is not valid unless you sign it.)</xforms:label>
        </xforms:input>
        <xforms:input ref="my:form/my:declare/my:date">
          <xforms:label>Date</xforms:label>
        </xforms:input>
      </p>
      <p>(Employer: Complete lines 8 and 10 only if sending to the IRS.)</p>
      <ol>
        <li>
          <xforms:input ref="my:form/my:q8">
            <xforms:label>Employer's name and address</xforms:label>
          </xforms:input>
        </li>
        <li>
          <xforms:input ref="my:form/my:q9">
            <xforms:label>Office code (optional)</xforms:label>
          </xforms:input>
        </li>
        <li>
          <xforms:input ref="my:form/my:q10">
            <xforms:label>Employer identification number (EIN)</xforms:label>
          </xforms:input>
        </li>
      </ol>
    </section>
  </body>
</html>

QTI

<html xmlns="http://www.w3.org/2002/06/xhtml2/" 
  xmlns:qti="http://www.imsglobal.org/xsd/imsqti_v2p0" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:ev="http://www.w3.org/2001/xml-events" 
  xmlns:my="SYSTEM">
  <head>
    <title>Form W-4 Employee's Withholding Allowance Certificate (Partial)</title>
  </head>
  <body>
    <section>
      <h>Personal Allowances Worksheet (Keep for your records.)</h>
      <ol>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item A" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheeta" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Enter "1" for yourself if no one else can claim you 
                as a dependent 
                <qti:textEntryInteraction responseIdentifier="worksheeta"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item B" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheetb" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Enter "1" if:</qti:p>
              <qti:ul>
                <qti:li>You are single and have only one job; or</qti:li>
                <qti:li>You are married, have only one job, and your spouse 
                  does not work; or</qti:li>
                <qti:li>Your wages from a second job or your spouse's wages 
                  (or the total of both) are $1,500 or less.</qti:li>
              </qti:ul>
              <qti:p>
                <qti:textEntryInteraction responseIdentifier="worksheetb"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item C" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheetc" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Enter "1" for spouse. But, you may choose to enter 
                "-0-" if you are married and have either a working 
                spouse or more than one job. (Entering "-0-" may help you 
                avoid having too little tax withheld.) 
                <qti:textEntryInteraction responseIdentifier="worksheetc"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item D" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheetd" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Enter number of dependents (other than your spouse or 
                yourself) you will claim on your tax return
                <qti:textEntryInteraction responseIdentifier="worksheetd"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item E" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheete" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Enter "1" if you will file as head of household on 
                your tax return (see conditions under Head of household above)
                <qti:textEntryInteraction responseIdentifier="worksheete"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item F" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheetf" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Enter "1" if you have at least $1,800 of child or dependent 
                care expenses for which you plan to claim a credit (Note. Do 
                not include child support payments. See Pub. 503, Child and 
                Dependent Care Expenses, for details.) 
                <qti:textEntryInteraction responseIdentifier="worksheetf"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item G" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheetg" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Child Tax Credit (including additional child tax credit). 
                See Pub. 972, Child Tax Credit, for more information.</qti:p>
              <qti:ul>
                <qti:li>If your total income will be less than $61,000 ($90,000 
                  if married), enter "2" for each eligible child; then less 
                  "1" if you have three or more eligible children.</qti:li>
                <qti:li>If your total income will be between $61,000 and $84,000 
                  ($90,000 and $119,000 if married), enter "1" for each 
                  eligible child plus "1" additional if you have six or more 
                  eligible children.</qti:li>
              </qti:ul>
              <qti:p>
                <qti:textEntryInteraction responseIdentifier="worksheetg"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Worksheet Item H" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="worksheeth" 
              cardinality="single"/>
            <qti:itemBody>
              <qti:p>Add lines A through G and enter total here. (Note. This may be 
                different from the number of exemptions you claim on your tax 
                return.)</qti:p>
              <qti:p>For accuracy, complete all worksheets that apply.</qti:p>
              <qti:ul>
                <qti:li>If you plan to itemize or claim adjustments to income and 
                  want to reduce your withholding, see the Deductions and 
                  Adjustments Worksheet on page 2.</qti:li>
                <qti:li>If you have more than one job or are married and you and 
                  your spouse both work and the combined earnings from all jobs 
                  exceed $40,000 ($25,000 if married), see the Two-Earners/Multiple 
                  Jobs Worksheet on page 2 to avoid having too little tax 
                  withheld.</qti:li>
                <qti:li>If neither of the above situations applies, stop here and 
                  enter the number from line H on line 5 of Form W-4 
                  below.</qti:li>
              </qti:ul>
              <qti:p>
                <qti:textEntryInteraction responseIdentifier="worksheeth"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
      </ol>
    </section>
    <section>
      <h>Form W-4 Employee's Withholding Allowance Certificate 2009</h>
      <p>CMB No. 1545-0074</p>
      <p>Department of the Treasury</p>
      <p>Internal Revenue Service</p>
      <p>Whether you are entitled to claim a certain number of allowances or exemption from 
        withholding is subject to review by the IRS. Your employer may be required to send a 
        copy of this form to the IRS.</p>
      <ol>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 1" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="q1fname" cardinality="single"/>
            <qti:responseDeclaration identifier="q1lname" cardinality="single"/>
            <qti:responseDeclaration identifier="q1homeaddr" cardinality="single"/>
            <qti:responseDeclaration identifier="q1citystatezip" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Type or print your first name and middle initial.
                <qti:textEntryInteraction responseIdentifier="q1fname"/>
              </qti:p>
              <qti:p>Last name
                <qti:textEntryInteraction responseIdentifier="q1lname"/>
              </qti:p>
              <qti:p>Home address (number and street or rural route)
                <qti:textEntryInteraction responseIdentifier="q1homeaddr"/>
              </qti:p>
              <qti:p>City or town, state, and ZIP code
                <qti:textEntryInteraction responseIdentifier="q1citystatezip"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 2" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="q2" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Your social security number 
                <qti:textEntryInteraction responseIdentifier="q2"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="choice" title="Question 3" adaptive="false"
            timeDependent="false">
            <qti:responseDeclaration identifier="q3" cardinality="single"/>
            <qti:itemBody>
              <qti:choiceInteraction responseIdentifier="q3" shuffle="false"
                maxChoices="1">
                <qti:simpleChoice identifier="single">Single
                  </qti:simpleChoice>
                <qti:simpleChoice identifier="married">Married
                  </qti:simpleChoice>
                <qti:simpleChoice identifier="marriedexception">
                  Married, but withhold at higher Single rate.
                  </qti:simpleChoice>
              </qti:choiceInteraction>
              <qti:p>Note. If married, but legally separated, or spouse is a 
                nonresident alien, check the "Single" box.</qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 5" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="q5" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Total number of allowances you are claiming (from line 
                H above or from the applicable worksheet on page 2)
                <qti:textEntryInteraction responseIdentifier="q5"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 6" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="q6" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Additional amount, if any, you want withheld from each 
                paycheck <qti:textEntryInteraction responseIdentifier="q6"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 7" 
            adaptive="false" timeDependent="false">
            <qti:responseDeclaration identifier="q7" cardinality="single"/>
            <qti:itemBody>
              <qti:p>I claim exemption from withholding for 2009, and I certify 
                that I meet both of the following conditions for exemption.
                </qti:p>
              <qti:ul>
                <qti:li>Last year I had a right to a refund of all federal 
                  income tax withheld because I had no tax liability and
                  </qti:li>
                <qti:li>This year I expect a refund of all federal income tax 
                  withheld because I expect to have no tax liability.</qti:li>
              </qti:ul>
              <qti:p>If you meet both conditions, write "Exempt" here 
                <qti:textEntryInteraction responseIdentifier="q7"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
      </ol>
      <p>Under penalties of perjury, I declare that I have examined this certificate and to the best
        of my knowledge and belief, it is true, correct, and complete.</p>
      <qti:assessmentItem identifier="textEntry" title="Name" adaptive="false" timeDependent="false">
        <qti:responseDeclaration identifier="name" cardinality="single"/>
        <qti:itemBody>
          <qti:p>Employee's signature (Form is not valid unless you sign it.) 
            <qti:textEntryInteraction responseIdentifier="name"/>
            </qti:p>
        </qti:itemBody>
      </qti:assessmentItem>
      <qti:assessmentItem identifier="textEntry" title="Date" adaptive="false" timeDependent="false">
        <qti:responseDeclaration identifier="date" cardinality="single"/>
        <qti:itemBody>
          <qti:p>Date <qti:textEntryInteraction responseIdentifier="date"/></qti:p>
        </qti:itemBody>
      </qti:assessmentItem>
      <p>(Employer: Complete lines 8 and 10 only if sending to the IRS.)</p>
      <ol>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 8" adaptive="false" 
            timeDependent="false">
            <qti:responseDeclaration identifier="q8" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Employer's name and address 
                <qti:textEntryInteraction responseIdentifier="q8"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 9" adaptive="false" 
            timeDependent="false">
            <qti:responseDeclaration identifier="q9" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Office code (optional) 
                <qti:textEntryInteraction responseIdentifier="q9"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
        <li>
          <qti:assessmentItem identifier="textEntry" title="Question 10" adaptive="false" 
            timeDependent="false">
            <qti:responseDeclaration identifier="q10" cardinality="single"/>
            <qti:itemBody>
              <qti:p>Employer identification number (EIN) 
                <qti:textEntryInteraction responseIdentifier="q10"/>
              </qti:p>
            </qti:itemBody>
          </qti:assessmentItem>
        </li>
      </ol>
    </section>
  </body>
</html>
Personal tools