XForms/Template

Motivation

Why are you creating this example? Should start with "You want to..."

↑Jump back a section

Screen Image

A sample screen image. Many people do not have the ability to run the examples so this is critical.

Use this format:

File:My-screen-image.jpg
This is my caption

Make SURE you label all images with a license. Please use creative commons share alike with attribution if you can.

↑Jump back a section

Sample Code

  • Please make the default namespace xhtml.
  • Please use the xf as the namespace prefix for all XForms elements.
  • Use spaces to indent, not tabs. Wikimedia and browsers use different setting for tab-stops. This can not be changed.
  • Wrap your source code using the source element to give the code syntax highlighting:
   <source lang="xml">
   ...
   </source>
↑Jump back a section

Sample XForms Template

<html
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ev="http://www.w3.org/2001/xml-events"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xf="http://www.w3.org/2002/xforms">
   <head>
       <title>Form Title</title>
       <style type="text/css">
          @namespace xf url("http://www.w3.org/2002/xforms");
          body {font-family:Helvetica, sans-serif;}
       </style>
       <xf:model>
          <xf:instance xmlns="">
            <data>
               <my-element>Hello World</my-element>
            </data>
          </xf:instance>
       </xf:model>
    </head>
    <body>
         <xf:input ref="my-element">
            <xf:label>Message: </xf:label>
         </xf:input>
    </body>
</html>
↑Jump back a section

Auto navigation macro

Please place the following macro at the end of each example:

{{auto navigation|NextExample|PriorExample}}


This allows readers to just page through the examples without using the back button.

↑Jump back a section

Discussion

Some analysis of the more difficult or unusual sections of the example. Any long complex XPath expressions should be explained on a step-by-step basis.

↑Jump back a section

Credits

Make sure you give credits to other examples that people have done. Our license is Sharealike with Attribution so we want to also give other developers attribution if they started some examples. Give a URL to the original author's code if you can.

Next Page: NextExample | Previous Page: PriorExample

Home: XForms

↑Jump back a section
Last modified on 13 October 2008, at 19:17