|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 3 | + |
| 4 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 5 | +<head> |
| 6 | + <meta name="generator" |
| 7 | + content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org"/> |
| 8 | + <meta http-equiv="Content-Type" content= |
| 9 | + "text/html; charset=us-ascii"/> |
| 10 | + |
| 11 | + <title>Form structures</title> |
| 12 | + <link type="text/css" rel="stylesheet" href="https://solid.github.io/mashlib/dist/mash.css"/> |
| 13 | + |
| 14 | + <link type="text/css" rel="stylesheet" href="../style/demo-style.css"/> |
| 15 | + |
| 16 | + <script type="text/javascript" src="https://solid.github.io/mashlib/dist/mashlib.js"></script> --> |
| 17 | + <script type="text/javascript" src="https://timbl.com/timbl/Automation/Library/Mashup/mashlib.js"></script> |
| 18 | + <script type="text/javascript" src="test-form.js"></script> |
| 19 | +</head> |
| 20 | + |
| 21 | +<body> |
| 22 | +<div class="TabulatorOutline" id="DummyUUID"> |
| 23 | + <table id="outline" summary="Space for where the test happens"> |
| 24 | + </table> |
| 25 | +</div> |
| 26 | + |
| 27 | +<div class="TabulatorOutline" id='UITestArea'></div> |
| 28 | + |
| 29 | +<h1>Form structures</h1> |
| 30 | +<pre id='Prolog'> |
| 31 | + @prefix foaf: <http://xmlns.com/foaf/0.1/>. |
| 32 | + @prefix sched: <http://www.w3.org/ns/pim/schedule#>. |
| 33 | + @prefix cal: <http://www.w3.org/2002/12/cal/ical#>. |
| 34 | + @prefix dc: <http://purl.org/dc/elements/1.1/>. |
| 35 | + @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. |
| 36 | + @prefix ui: <http://www.w3.org/ns/ui#>. |
| 37 | + @prefix trip: <http://www.w3.org/ns/pim/trip#>. |
| 38 | + @prefix vcard: <http://www.w3.org/2006/vcard/ns#>. |
| 39 | + @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. |
| 40 | + @prefix ex: <#>. # Things in the examples |
| 41 | + @prefix : <#>. |
| 42 | +</pre> |
| 43 | + |
| 44 | +<div> |
| 45 | + <table style= |
| 46 | + 'border-collapse: collapse; border: 0.1em solid gray;' summary= |
| 47 | + "Table of input data values and UI outputs generated"> |
| 48 | + <tbody> |
| 49 | + |
| 50 | + <tr class="form-demo"> |
| 51 | + <td class='input'> |
| 52 | + <pre> |
| 53 | + # A simple group with two fields |
| 54 | + |
| 55 | +ex:form a ui:Group; |
| 56 | + ui:parts (ex:part1 ex:part2). |
| 57 | + |
| 58 | + ex:part1 a ui:SingleLineTextField ; |
| 59 | + ui:property vcard:fn; |
| 60 | + ui:label "name" . |
| 61 | + |
| 62 | + ex:part2 a ui:EmailField ; |
| 63 | + ui:property vcard:hasEmail; # @@ chcek |
| 64 | + ui:label "email" . |
| 65 | + |
| 66 | + |
| 67 | +ex:this vcard:fn "Alice"; |
| 68 | + vcard:hasEmail <mailto:alice@example.com> . |
| 69 | +</pre> |
| 70 | + </td> |
| 71 | + <td class='output'></td> |
| 72 | + </tr> |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + <tr class="form-demo"> |
| 77 | + <td class='input'> |
| 78 | + <pre> |
| 79 | + # A group with two fields and a nested subgroup |
| 80 | + |
| 81 | +:form a ui:Group; |
| 82 | + ui:parts (:nameField :emailField :addresses) . |
| 83 | + |
| 84 | + :nameField a ui:SingleLineTextField ; |
| 85 | + ui:property vcard:fn; |
| 86 | + ui:label "name" . |
| 87 | + |
| 88 | + :emailField a ui:EmailField ; |
| 89 | + ui:property vcard:hasEmail; # @@ chcek |
| 90 | + ui:label "email" . |
| 91 | + |
| 92 | + :addresses |
| 93 | + a ui:Multiple ; # -- Allows zero or one or more |
| 94 | + ui:part :oneAddress ; |
| 95 | + ui:property vcard:hasAddress . |
| 96 | + |
| 97 | + :oneAddress |
| 98 | + a ui:Group ; # A subgroup of the main form |
| 99 | + ui:parts ( :street :locality :postcode :region :country ). |
| 100 | + |
| 101 | + :street |
| 102 | + a ui:SingleLineTextField ; |
| 103 | + ui:maxLength "128" ; |
| 104 | + ui:property vcard:street-address ; |
| 105 | + ui:size "40" . |
| 106 | + |
| 107 | + :locality |
| 108 | + a ui:SingleLineTextField ; |
| 109 | + ui:maxLength "128" ; |
| 110 | + ui:property vcard:locality ; |
| 111 | + ui:size "40" . |
| 112 | + |
| 113 | + :postcode |
| 114 | + a ui:SingleLineTextField ; |
| 115 | + ui:maxLength "25" ; |
| 116 | + ui:property vcard:postal-code ; |
| 117 | + ui:size "25" . |
| 118 | + |
| 119 | + :region |
| 120 | + a ui:SingleLineTextField ; |
| 121 | + ui:maxLength "128" ; |
| 122 | + ui:property vcard:region ; |
| 123 | + ui:size "40" . |
| 124 | + |
| 125 | + :country |
| 126 | + a ui:SingleLineTextField ; |
| 127 | + ui:maxLength "128" ; |
| 128 | + ui:property vcard:country-name ; |
| 129 | + ui:size "40" . |
| 130 | + |
| 131 | +##### Data: |
| 132 | + |
| 133 | +:this vcard:fn "Alice"; |
| 134 | + vcard:hasEmail <mailto:alice@example.com> ; |
| 135 | + vcard:hasAddress [ |
| 136 | + vcard:street-address "111 Accacia Avennue"; |
| 137 | + vcard:country-name "UK" |
| 138 | + ], |
| 139 | + [ |
| 140 | + vcard:street-address "101 Autumn Ave"; |
| 141 | + vcard:country-name "USA" |
| 142 | + ] . |
| 143 | +</pre> |
| 144 | + </td> |
| 145 | + <td class='output'></td> |
| 146 | + </tr> |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | +___________ |
| 153 | + |
| 154 | + </tbody> |
| 155 | + </table> |
| 156 | +</div> |
| 157 | +</body> |
| 158 | +</html> |
0 commit comments