From Wikibooks, open books for an open world
Jump to navigation Jump to search

Motivation[edit | edit source]

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

Screen Image[edit | edit source]

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

Use this format:

This is my caption

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

Sample Code[edit | edit source]

  • 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:
   <syntaxhighlight lang="xml">

Sample XForms Template[edit | edit source]

       <title>Form Title</title>
       <style type="text/css">
          @namespace xf url("http://www.w3.org/2002/xforms");
          body {font-family:Helvetica, sans-serif;}
          <xf:instance xmlns="">
               <my-element>Hello World</my-element>
         <xf:input ref="my-element">
            <xf:label>Message: </xf:label>

Auto navigation macro[edit | edit source]

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.

Discussion[edit | edit source]

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.

Credits[edit | edit source]

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