source: proto/xmlschema/test/eg-01.xml @ 3290

Last change on this file since 3290 was 3290, checked in by shiyangy, 6 years ago

add some test files and modified character set code general file

File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<html xmlns="http://www.w3.org/2002/06/xhtml2"
3      xmlns:xforms="http://www.w3.org/2002/xforms"
4      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5      xmlns:my="http://commerce.example.com/payment"
6      xmlns:ev="http://www.w3.org/2001/xml-events" xml:lang="en">
7  <head>
8<style type="text/css">
9xforms|input.editField {
10 font-weight:bold; font-size:20px; width:500px
11}
12xforms|label.sectionLabel {
13  font-weight:bold; color:white; background-color:blue
14}
15xforms|submit {
16  font-family: Arial; font-size: 20px; font-style: bold; color: red
17}
18</style>
19    <title>Editing Hierarchical Bookmarks In X-Smiles </title>
20    <xforms:model id="bookmarks">
21      <xforms:instance src="bookmarks.xml"/>
22      <xforms:submission id="s01" method="post" action="http://examples.com/"/>
23    </xforms:model>
24  </head>
25  <body>
26    <xforms:repeat nodeset="section" id="repeatSections">
27      <xforms:input ref="@name" class="editField">
28        <xforms:label class="sectionLabel">Section</xforms:label>
29      </xforms:input>
30<!-- BOOKMARK REPEAT START -->
31      <xforms:repeat nodeset="bookmark" id="repeatBookmarks">
32        <xforms:input ref="@name">
33          <xforms:label>Bookmark name</xforms:label>
34        </xforms:input>
35        <xforms:input ref="@href">
36          <xforms:label>URL</xforms:label>
37        </xforms:input>
38      </xforms:repeat>
39    </xforms:repeat>
40    <p>
41<!-- INSERT BOOKMARK BUTTON -->
42      <xforms:trigger id="insertbutton">
43        <xforms:label>Insert bookmark</xforms:label>
44        <xforms:insert nodeset="section[index('repeatSections')]/bookmark"
45          at="index('repeatBookmarks')" position="after" ev:event="xforms-activate"/>
46      </xforms:trigger>
47<!-- DELETE BOOKMARK BUTTON -->
48      <xforms:trigger id="delete">
49        <xforms:label>Delete bookmark</xforms:label>
50        <xforms:delete nodeset="section[index('repeatSections')]/bookmark"
51          at="index('repeatBookmarks')" ev:event="xforms-activate"/>
52      </xforms:trigger>
53    </p>
54    <p>
55<!-- INSERT SECTION BUTTON -->
56      <xforms:trigger id="insertsectionbutton">
57        <xforms:label>Insert section</xforms:label>
58        <xforms:insert nodeset="section" at="index('repeatSections')"
59          position="after" ev:event="xforms-activate"/>
60      </xforms:trigger>
61<!-- DELETE SECTION BUTTON -->
62      <xforms:trigger id="deletesectionbutton">
63        <xforms:label>Delete section</xforms:label>
64        <xforms:delete nodeset="section" at="index('repeatSections')"
65         ev:event="xforms-activate"/>
66      </xforms:trigger>
67    </p>
68<!-- SUBMIT BUTTON -->
69    <xforms:submit submission="s01">
70      <xforms:label>Save</xforms:label>
71      <xforms:hint>Click to submit</xforms:hint>
72    </xforms:submit>
73  </body>
74</html>
Note: See TracBrowser for help on using the repository browser.