text:
Bahai Education/Education of Infants

VII. EDUCATION OF INFANTS

VII-100. EARLY EDUCATION ESSENTIAL
a. if education children from earliest years with Bahá'í education they will be protected from every test: SW IX:8, 89-96

b. early education is most important as altering character after puberty after the awakening of growing appetites of self and nature is very difficult: SW VII:15; SWAB:#111, 137

c. when the bough is green and tender it will grow in whatever way ye train it: SWAB:#95, 125; #110, 136; #111, 137

d. divine foundation laid in earliest years in essence of child: SWAB:#111, 137

e. if trained from infancy through loving care of the Holy Gardener will drink in spirit and knowledge like young tree: SWAB:#103, 129

f. suckle children from infancy with milk of universal education: SWAB:#96, 126 1) while in infancy feed from breast of heavenly grace, foster in cradle of all excellence, rear in embrace of bounty: SWAB:#102, 129

g. rear children from earliest days to establish a way of life within their very nature, inmost heart that conforms to the divine teachings in all things: SWAB:#96, 126

h. from very beginning children must receive divine education and be reminded to remember God: SWAB:#99, 127

j. spiritual education from very beginning of life: SWAB:#122, 142

k. From their childhood instill in their hearts: PUP:53

l. from the very beginning of life every child will be refreshed by the gentle waftings of the love of God and will tremble with joy at the sweet scent of heavenly guidance. In this lieth the beginning of the process; it is the essential basis of all the rest: 'Abdu'l-Baha, Bahá'í Education, #79, p. 31

m. if not educated spiritually early then later most difficult to curb growing appetites of self and nature; the lower appetites are kings over men, must be defeated or they will be defeated by them: 'Abdu'l-Baha in DMAS 6/16/1914, in SW VII:15, pp. 141-144

VII-200. THE EDUCATOR OF INFANTS
a. responsibility of the mother of the infant: SW V:7, 101; SW VII:15, 141-144; SW IX:7, 81-88; SW XIV:9, 267-268; TAB:III:577; SWAB:#94, 124; #95, 124-125; #96, 126; #99, 127; #113, 138

b. mothers must rear children as a gardener tends young plants: SWAB:#95, 125

c. mothers must consider that education of children is of first importance, must put forth every effort in this regard: SWAB:#95, 125

d. mothers determine the happiness, the future greatness, the courteous ways and learning and judgment, understanding and faith of little ones: SWAB:#96, 126

VII-300. COUNSELS TO MOTHERS
a. educate the little ones from the earliest days: SWAB:#95, 124

b. thoroughly train them: SWAB:#95, 124

c. rear them to have good character and good morals: SWAB:#94, 124; #95, 124; 'Abdu'l-Baha, Bahá'í Education, #42, p. 16 1) Bahá'í conduct and the ways of God: SWAB:#97, 126

d. guide them to all the virtues of humankind: SWAB:#95, 124-125

e. prevent development of behaviour worthy of blame: SWAB:#95, 125

f. foster in embrace of Bahá'í education: SWAB:#95, 125

g. nurture in breast of the knowledge and love of God: SWAB:#95, 125 1) nurture at breast of love of God and in embrace of knowledge of God: SWAB:#103, 130-131

h. teach righteousness and dignity of humankind: SWAB:#95, 125

i. teach resolution: SWAB:#95, 125

j. teach to strive and to endure: SWAB:#95, 125

k. perseverance in all things: SWAB:#95, 125

l. will to advance: SWAB:#95, 125

m. highmindedness: SWAB:#95, 125

n. high resolve: SWAB:#95, 125

o. chastity: SWAB:#95, 125

p. purity of life: SWAB:#95, 125

q. strive night and day to establish faith and certitude in their children: SWAB:#95, 125

r. fear of God: SWAB:#95, 125

s. love of the Beloved of the worlds: SWAB:#95, 125

t. all good qualities and traits: SWAB:#95, 125

u. give them advantage of every kind of knowledge, every new and rare and wondrous craft and art: SWAB:#100, 127

v. bring them up to work and strive: SWAB:#102, 129

w. accustom them to hardship: SWAB:#102, 129

x. teach them to dedicate their lives to matters of great import: SWAB:#102, 129

y. inspire them to undertake studies that will benefit mankind: SWAB:#102, 129

z. let love of God pervade inmost being commingled with mother's milk: SWAB:#99, 127;#114, 139

aa. best way for mothers to worship God is by educating her children: SWAB:#114, 139

ab. continually call God to mind and make mention of Him, and tell of His greatness, and instill the fear of Him in the child: 'Abdu'l-Baha, Bahá'í Education, #79, p. 31

ac. rear the child gently, in the way of tenderness: 'Abdu'l-Baha, Bahá'í Education, #79, p. 31

ad. rear child in extreme cleanliness: 'Abdu'l-Baha, Bahá'í Education, #79, p. 31

ae. when the children are ready for bed, read or sing them the Odes of the Blessed Beauty: 'Abdu'l-Baha, Bahá'í Education, #78, p. 30

af. especially mothers must think of how to best educate children: 'Abdu'l-Baha in DMAS 9/2/1913, in SW VII:15, pp. 141-144

VII-400. METHOD OF TEACHING INFANTS
a. must rear children as a gardener tends young plants: SWAB:#95, 125

b. praise and applaud child and cheer his heart whenever he has done well: SWAB:#95, 125

c. counsel and punish child if the slightest undesirable trait should manifest itself: SWAB:#95, 125

VII-500. PURPOSE OF SPIRITUAL EDUCATION OF INFANTS
a. if they are educated in this fashion, they will be enabled to carry to successful conclusion whatever they undertake: SWAB:#95, 125

title: Bahai Education/Education of Infants


text:
Bahai Education/Education of Female Students

VIII. EDUCATION OF GIRL STUDENTS

VIII-100. WILL ESTABLISH EQUALITY OF MEN AND WOMEN
a. chief cause of mental and physical inequalities of the sexes are derived from custom and training and are not innate: SW III:3

b. if educational opportunities were made equal and similar, man and woman would equalize in attainment: PUP:75, 108, 233, 318, 375

c. He promulgated the adoption of the same course of education for man and woman. Daughters and sons must follow the same curriculum of study, thereby promoting unity of the sexes.

('Abdu'l-Bahá, "The Promulgation of Universal Peace", p. 175)

VIII-200. TAKES PRECEDENT OVER EDUCATION OF BOYS
a. school for girls taketh precedence over the school for boys, for they are the first educators of children: 'Abdu'l-Baha, in Bahá'í Education, #85, p. 34

b. particular attention to school for girls, for the greatness of this wondrous Age will be manifested as a result of progress in the world of women: 'Abdu'l-Baha, in Bahá'í Education, #70, p. 27

c. education of woman is more necessary and important than education of man, for woman is the trainer of the child from its infancy: PUP:133, 175

VIII-300. CURRICULUM IN COMMON WITH BOYS
a. various branches of knowledge: SWAB:#94, 124

b. good behaviour: SWAB:#94, 124

c. proper way of life: Ibid.

d. cultivation of good character: Ibid.

e. chastity: Ibid.

f. constancy: Ibid.

g. perseverance: Ibid.

h. strength: Ibid.

i. determination: Ibid.

j. firmness of purpose: Ibid.

k. whatever will nurture the health of the body and its physical soundness: Ibid.

VIII-400. CURRICULUM UNIQUE TO GIRLS
(Note: Given the above statement on girls and boys sharing an equal curriculum, the following suggestions on topics for study could either be simply context dependent on the needs in Iran at the time of the writing of the concerning Tablets or due to the fact that such meetings were advised as voluntary activities (and part of a type of meeting also mentioned in conjunction with teaching youth how to teach the Baha'i Faith, etc.) unrelated to what is recommended for public school curricula. The advice to study agricultural sciences, and in other places for women to demonstrate their equality to study history, etc., can be read as encouraging equalization rather than professional specialization)

a. household management: Ibid.

b. education of children: Ibid.

c. whatever applies to the needs of girls: Ibid.

d. how to guard children from disease: Ibid.

e. industrial and agricultural sciences: PUP:283

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
User talk:Twunderl

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. Mattb112885 (talk to me) 18:37, 10 August 2007 (UTC)

title: User talk:Twunderl


text:
Bahai Education/Counsels to Students

IX. COUNSELS TO STUDENTS

IX-100. COUNSELS TO ALL STUDENTS
a. advise each other with the utmost consideration: SW VII:18, 183-184

b. daily watch your words and deeds: SW VII:18; SW IX:8

c. the sacred duties of children towards their parents are revealed in the Book of God: TAB:II:262-263 1) parents are worthy of esteem: TAB:II:463	a) have due regard for the rights of parents: Baha'u'llah, Compilation of Compilations, I, #821 b) show honour to parents and pay homage to them: Baha'u'llah, Compilation of Compilations, I, #824	c) seek diligently to ensure the comfort and welfare of his loving father...constantly strive to bring gladness to the hearts of his father and mother: 'Abdu'l-Baha, in Family Life, p. 10 d) comfort thy mother and endeavor to do what is conducive to the happiness of her heart: TAB:II:262-263	2) be kind and obedient to parents: TAB:III:551 a) obedience to parents depends on them being reared religious: Baha'u'llah, in Bahá'í Education, #14, p. 4	b) the son must show forth the utmost obedience towards his father: 'Abdu'l-Baha, in Family Life, p. 10 3) love parents equally: SW IX:8	4) prefer service to parents to service to the Cause: SWAB:#116, 140 a) Verily, We have enjoined on every son to serve his father: KA:Q104, 138	b) choose to serve parents if choice of this or service to Baha'u'llah: Baha'u'llah, Compilation of Compilations, I, #824

d. the prosperity of children depends on the good-pleasure of their parents: TAB:II:262,463

e. caress brother and sister: TAB:III:551

f. daily add to faith and assurance: TAB:III:551; SW IX:8, 89-96

g. be spiritual as well as well as physical son of father: TAB:II:342; SWAB:#117, 140

h. advance rapidly: SW IX:8

i. do not waste the opportunity of being born in this Day: SW IX:8

j. boys: manliness: SW IX:8

k. be humble: SW IX:8

l. love one another: SW IX:8

m. occupy selves in affirming reasons for truth of the Cause: SW IX:8

n. occupy selves in learning how to deliver the Word to everyone: SW IX:8

o. do not waste time in chattering, useless talk: SW IX:8

p. do not waste time in running around: SW IX:8

q. do not think of getting riches: SW IX:8

r. do not be puffed up with pride: SW IX:8

s. do not despise any being: SW IX:8

t. acknowledge your own faults: SW IX:8

u. work for the sake of God: SW IX:8

v. love Baha'u'llah more than you love parents: SW IX:8

w. strive to acquire a share of arts and sciences: SWAB:#119, 140

x. surpass all other children in arts and sciences, learning in a month what others learn in a year: SWAB:#119, 141

y. may they become accounted as professors in academies and teachers of wisdom in the school of inner significances: SWAB:#118, 140-141

z. be devoted to the service of mankind: SWAB:#120, 141

aa. become known for intellectual attainments: SWAB:#120, 141

ab. give up rest and comfort: SWAB:#120, 141

ac. if engage in the perfection of an art or acquisition of a science with all of your power then you are worshipping God: SWAB:#126, 144-145

ad. become perfect in profession and famous: SWAB:#128, 145-146

ae. become imbued with all the virtues of the human world...advance in all material and spiritual degrees...become learned in sciences, acquire the arts and crafts, prove to be useful members of human society and assist the progress of human civilization: PUP:92

af. be a cause of the manifestation of divine bestowals...devoted to the love and unity of mankind: PUP:92

ag. strive every nerve to acquire inner and outer perfections, knowledge, wisdom, spiritual perception and eloquent speech: Baha'u'llah, in Bahá'í Education, #9, p. 3

ah. study history and teachings of the Cause: Shoghi Effendi, Compilation of Compilations, I, #432

ai. strive to unravel mysteries of mind and spirit, to grasp secrets of Day of God, to inform self of evidences that the Most Great Name hath dawned, open lips in praise, adduce convincing arguments and proofs, teach the Faith: 'Abdu'l-Baha, in Bahá'í Education, #106, p. 43

aj. deepen knowledge, perfect selves in Bahá'í standards of virtue and upright conduct: on behalf of Shoghi Effendi, Dawn of a New Day, pp. 179-180

ak. try to grasp the true meaning of the teachings and not merely accepting them as something you are taught: on behalf of Shoghi Effendi, Compilation of Compilations, I, #493

al. every child without exception must from his earliest years must...according to his own tastes and inclinations and the degree of his capacity and powers, devote extreme diligence to the acquisition of learning: Shoghi Effendi, Bahá'í Education, #121, pp. 49-50

am. Bahá'í children and young people have great privileges and obligations ahead...prepare yourselves for this great task by trying to grasp the true meaning of the teachings and not just merely accepting them as something you are taught: on behalf of Shoghi Effendi, Bahá'í Education, #148, p. 59

IX-200. COUNSELS TO YOUTH
a. encourage youth to master and digest the facts recorded in Nabil's narrative as a basis for their future work in the teaching field, and as a sustenance to their spiritual life and activities in the service of the Cause: Shoghi Effendi, The Importance of Deepening our Understanding and Knowledge of the Faith, #78, p. 22

b. you who are present in your teens, or twenties, must realize that tomorrow, to a large extent, the burden of the Cause will rest on your shoulders; you will have to be the administrators and teachers and scholars of the Faith. Now is the time to prepare yourselves for your future duties...study the teachings deeply, their spiritual, moral, and administrative precepts, and at the same time take as active a part as possible in the life of your respective Bahá'í communities: on behalf of Shoghi Effendi, Dawn of a New Day, p. 183

c. need of modern youth is for ethics founded on pure religious faith: on behalf of Shoghi Effendi, Bahá'í News, #104 (12/1936), p. 1

d. in youthful years will make many decisions which will set the course of his life...opportunities to truly apprehend the teachings of their Faith and to give them to their contemporaries...overcome the pressures of the world and to provide leadership...exemplify in their lives the high moral standards set forth in the Bahá'í writings: Universal House of Justice, Wellspring of Guidance, pp. 92-93

IX-300. COUNSELS TO COLLEGE STUDENTS
a. Diary of Mirza Ahmad Sohrab, 2/15/1914, in SW IX:9, 97-104

b. Diary of Mirza Ahmad Sohrab, 4/15/1914, in SW VII:19, 183-184; SW IX:9; SW

c. Diary of Mirza Ahmad Sohrab, 4/17/1914, in SW IX:9

d. Diary of Mirza Ahmad Sohrab, 10/12/1914, in SW IX:9

e. Diary of Mirza Ahmad Sohrab, 7/15/1915, in SW IX:9

f. Diary of Mirza Ahmad Sohrab, summer 1915 ?, in SW XIII:5, 102-104

title: Bahai Education/Counsels to Students


text:
Bahai Education/Educators

X. EDUCATORS

X-100. EDUCATOR DEFINED
a. educator is like a gardener tending a plant: SWAB:#122, 143

b. if not educator the souls would remain savage, ignorant: SWAB:#98, 126

X-200. ATTRIBUTE OF GOD
a. Consider, for instance, the revelation of the light of the Name of God, the Educator: GL:XCIII:189-190

X-300. PROPHETS OF GOD
a. Wert thou to consider, for but a little while, the outward works and doings of Him Who is the Eternal Truth, thou wouldst fall down upon the ground, and exclaim: O Thou Who art the Lord of Lords! I testify that Thou art the Lord of all creation, and the Educator of all beings, visible and invisible: GL:CXV:243

b. Prophets of God are the perfect material, human and divine educators: SAQ:III:9-13

c. Prophets of God are the real Educators, the perfect Instructors of mankind: PUP:364

d. Manifestations of God come to educate and illumine mankind...first Teachers and Educators of humanity: PUP:330

e. Prophets of God are divine educators: SWAB:#102, 128

X-400. MOTHERS ARE FIRST TEACHERS
a. mother is first educator of child: SW V:7, 101; SW VII:15, 141-144; SW IX:7, 81-88; SW XIV:9. 267-268; TAB:III:577,606; SWAB:#94,#95,#96,#97,#99,#113; 'Abdu'l-Baha, Bahá'í Education, #79, p. 31; on behalf of Shoghi Effendi, Compilation of Compilations, I, #876; Universal House of Justice, Compilation of Compilations, I, #913

b. if parents neglect education of children they will be held responsible: TAB:III:577; SWAB:#98, 127

c. parents must strive with all effort to train children: 1) in knowledge, sciences and arts: TAB:III:577; SWAB:#98, 127	2) in good conduct and the study of books: SWAB:#101, 127 3) in study to degree required but so that no child remains illiterate: SWAB:#101, 127

d. parents must set aside part of income for education of children, giving it to a trustee with knowledge of the House of Justice: SW IX:7; TB:90

e. every mother and father must counsel children over long period, guide them to those things which lead to everlasting honour: SWAB:#108, 134

f. mothers must not think of themselves but of progress of their children: 'Abdu'l-Baha in DMAS 9/2/1913, in SW VII:15, pp. 141-144

g. mothers should think of educating not fondling and embracing and spoiling children: 'Abdu'l-Baha in DMAS 9/2/13, in SW VII:15, pp. 141-144

h. parents must take child out of school where there are heedless ones who will try to lead him astray: SW IX:8, 89-96

i. do not allow children to drink alcoholic drinks: SW VII:15

j. protect children from temptations and vices: SW VII:15

k. My hope is that your parents may educate you spiritually and give you thorough moral training: PUP:92

l. duty of parents to rear their children to be staunch in faith: Baha'u'llah, in Bahá'í Education, #12, p. 3

m. parents must exert every effort to rear their offspring to be religious: Baha'u'llah, in Bahá'í Education, #14, p. 4

n. true parenthood and parental mercy is that children are carefully watched over, protected and trained: 'Abdu'l-Baha, in Bahá'í Education, #42, p. 17

o. duty of parents to perfectly and thoroughly train their children; have abundant love love for them and exert utmost in training them: TAB:II:262

p. parents who are united and harmonized bring up children in love and knowledge, the gift and training of God: TAB:III:605-606

q. before born, for child are destined two founts of gleaming milk, eyes to watch over thee, and hearts to love thee: Persian Hidden Words, #29

r. best of all ways to worship God is to educate children and train them in all the perfections of humankind, no nobler deed: SWAB:#114, p. 139

s. if mother has learning and accomplishments, her children will be fostered in excellency, right conduct and beauty: 'Abdu'l-Baha, in Bahá'í Education, #85, p. 34

t. sacred obligation of the parents to provide their children with a thorough Bahá'í training: on behalf of Shoghi Effendi, in Bahá'í Education, #132, p. 53

X-500. FATHERS ARE SECOND TEACHERS
a. Unto every father hath been enjoined the instruction of his son and daughter in the art of reading and writing and in all that hath been laid down in the Holy Tablet: KA:K48, 37; TB:128 1) father must teach and instruct children according to his possibilities: PUP:300

b. He that bringeth up his son or the son of another, it is as though he hath brought up a son of Mine: KA:K48, 37; TB:128

c. He that putteth away that which is commanded unto him, the Trustees are then to take from him that which is required for their instruction if he be wealthy, and, if not, the matter devolveth upon the House of Justice: KA:K48, 37; TB:128 1) if father is unable to educate children, the body politic, representative of the people, must provide the means for their education: PUP:300, 317

d. Should a father neglect this most weighty commandment laid down in the Kitab-i-Aqdas by the Pen of the Eternal King, he shall forfeit rights of fatherhood, and be accounted guilty before God: KA:Q105, 138

e. father is second teacher of the child: SW IX:7

f. wise father plays with his children: SW IX:8, 89-96

g. if father fails in duty to teach children then must be compelled to discharge this responsibility: SWAB:#101, 127-128

h. if father unable to teach children then responsibility to do so devolves upon the House of Justice: SW IX:7, 81-88; SWAB:#101, 128

i. if parents neglect education of children they will be held responsible: TAB:III:577; SWAB:#98, 127

j. parents must strive with all effort to train children: 1) in knowledge, sciences and arts: TAB:III:577; SWAB:#98, 127	2) in good conduct and the study of books: SWAB:#101, 127 3) in study to degree required but so that no child remains illiterate: SWAB:#101, 127

k. parents must set aside part of income for education of children, giving it to a trustee with knowledge of the House of Justice: SW IX:7; TB:90

l. every mother and father must counsel children over long period, guide them to those things which lead to everlasting honour: SWAB:#108, 134

m. parents must take child out of school where there are heedless ones who will try to lead him astray: SW IX:8, 89-96

n. do not allow children to drink alcoholic drinks: SW VII:15

o. protect children from temptations and vices: SW VII:15

p. My hope is that your parents may educate you spiritually and give you thorough moral training: PUP:92

q. duty of parents to rear children to be staunch in faith: Baha'u'llah, in Bahá'í Education, #12, p. 3

r. parents must exert every effort to rear their offspring to be religious: Baha'u'llah, in Bahá'í Education, #14, p. 4

s. true parenthood and parental mercy is that children are carefully watched over, protected and trained: 'Abdu'l-Baha, in Bahá'í Education, #42, p. 17

t. duty of parents to perfectly and thoroughly train their children; have abundant love love for them and exert utmost in training them: TAB:II:262

u. parents who are united and harmonized bring up children in love and knowledge, the gift and training of God: TAB:III:605-606

v. teach children so that they will peruse divine verses every morning and evening: Baha'u'llah, in Compilation of Compilations, I, #5

w. every father must educate his children, both boys and girls, in sciences and morals, crafts and professions: Baha'u'llah, in Compilation of Compilations, I, #5

x. father must always endeavour to educate son and acquaint him with heavenly teachings, give him advice, exhort him, teach him praiseworthy conduct and character, enable him to study in school, acquire such arts and sciences as are useful and necessary, remembrance of God: 'Abdu'l-Baha, in Bahá'í Education, #100, p. 41

X-600. TEACHERS
a. teacher and system of teaching plays the most important role in the life of human being: SW VII:15; SW XVII:2, p. 55

b. teachers must be attracted, assured, educated and refined believers: SW VII:15

c. teachers must be familiar with child psychology: SW VII:15

d. teachers must be well grounded in science of pedagogy: SW VII:15

e. education and training of children is among the most meritorious acts of humankind: SWAB:#103, 129

f. mentor must be doctor to the character of the child as well as educator, remedy faults, give learning and rear to have spiritual nature, heal spiritual ailments: SWAB:#103, 130

g. thanks to loving efforts of teacher of primary school child may reach highest levels of achievement; may lift some child of small account to the exalted throne: SWAB:#104, 132

h. among the greatest of services to God is education and training of children: SWAB:#106, p. 133

i. instructs the children, and guides the people into the pathways of God: Baha'u'llah, in Bahá'í Education, #27, p. 7

j. education and training of children is highest service to God: 'Abdu'l-Baha, in Bahá'í Education, #60, p. 24

k. Blessed is that teacher who shall arise to instruct the children, and to guide the people into the pathways of God, the Bestower, the Well-Beloved: Baha'u'llah, Bahá'í Education, #27, p. 7

l. Blessed is that teacher who remaineth faithful to the Covenant of God, and occupieth himself with the education of children: Baha'u'llah, Bahá'í Education, #28, p. 7

X-700. CARETAKER OF ORPHANS
a. urged to become mother and father to orphans: SW VII:13, 122

X-800. EVERY BELIEVER
a. Address yourselves to the promotion of the well-being and tranquillity of the children of men. Bend your minds and wills to the education of the peoples and kindreds of the earth, that haply the dissensions that divide it may, through the power of the Most Great Name, be blotted out from its face, and all mankind become the upholders of one Order, and the inhabitants of one City: GL:CLVI:333-334

b. We prescribe unto all men that which will lead to the exaltation of the World of God amongst His servants, and likewise, to the advancement of the world of being and the uplift of souls: Baha'u'llah, Bahá'í Education, #6, p. 2

c. every one of friends of God has inescapable duty to promote knowledge and learning: SWAB:#97, 126; #102, 129

d. every believer must be active and progressive in the field of inventions and the arts: SWAB:#102, 129

e. every believer must endeavour to rectify the conduct of men and seek to excel the whole world in moral character: SWAB:#102, 129

f. train these children with divine exhortations. From their childhood instill in their hearts...Teach them to free themselves: PUP:53

X-900. TEACHER TRAINING
a. gathering of women believers for purposes of teaching and training children must be entirely spiritual and concerned with every means of training the girl children: SWAB:#94, 123-124

title: Bahai Education/Educators


text:
Bahai Education/Educational Institutions

XI. EDUCATIONAL INSTITUTIONS

INTRODUCTION
Educational Administration

The role of the administration is to translate purpose into collective action. The Bahá’í writings contain principles relevant to educational administration that can be used to improve the management of education and identify the variables necessary for successful collective life. Much of the current literature on effective administration and organizations supports the principles enunciated by Bahá’u’lláh in the nineteenth century. When groups understand these principles, value these qualities and strive to practice them in their various communities, they can cause meaningful improvements. Bahá’í communities serve as models of the effectiveness and practical application of these principles. The Bahá’í Local Spiritual Assembly, the primary administrative institution in Bahá’í communities, can serve as a model for the administration of a school community. The principles and guidelines for the Local Spiritual Assembly and the individuals in the community being administered are applicable. Shoghi Effendi, the authorized interpreter of Bahá’u’lláh’s work after ‘Abdu’l-Bahá, describes the role of the Local Spiritual Assembly and its relationship to the individual. You should turn to your local Assembly in the strictest confidence, and seek their aid and advice. These bodies have the sacred obligation to help, advise, protect, and guide the believers in every way within their power when appealed to - indeed they were established just for the purpose of keeping order and unity and obedience to the law of God amongst the believers. You should go to them as a child would to its parents. (1941, p. 16)

This structure requires certain responsibilities from both the administration and those being administered and is contrary to the spirit existing in many systems. Today there is a general disrespect for those in authority. This results partly because those in authority do not deserve the respect, partly because of tradition and culture, and partly because leaders are acceptable scapegoats. Bahá’u’lláh (1971) and ‘Abdu’l-Bahá (1969) state that those in authority must earn this respect by administering with justice. Without some consultation, justice and unity, little constructive change can occur. The administration of a school creates the structure and governance for the school community. It is important for it to have a sound and effective philosophy of operation. The Bahá’í administration contains certain elements found in the three existing forms of government without “any of the objectionable features which they inherently possess” (Shoghi Effendi 1955, p. 152-3). A purely democratic system depends on getting its mandate from the people and the participation of the governed. This approach is not efficient or practical as it requires lengthy discussions, decision-making, and knowledge that is not readily available to all involved. Bahá’í administration requires that those in authority must "acquaint themselves with the conditions prevailing among the community, must weigh dispassionately in their minds the merits of any case presented for their consideration, but must reserve for themselves the right of an unfettered decision." (1955, p. 153) An autocratic or aristocratic system is efficient, but conditions now require that the rights and responsibilities of all be safeguarded. There must be basic decisions agreed upon by all involved. The rights of all must be upheld. Corruption, bureaucratic tendencies and dictatorial authority generally found in these systems hamper proper functioning. Bahá’í administration is based on a decision-making process called consultation. It is a powerful tool that can be used to make sound, agreeable decisions and to improve the schools. The purpose of consultation is to find the truth of a matter, not to vaunt one person's opinions over another's. The Bahá’í writings contain extensive guidance on consultation.

Show forbearance and benevolence and love to one another. Should anyone among you be 	incapable of grasping a certain truth, or be striving to comprehend it, show forth, when conversing with him, a spirit of extreme kindness and good-will. Help him to see and recognize the truth, without esteeming yourself to be, in the least, superior to him, or to be possessed of greater endowments. (Bahá’u’lláh 1971, p. 8) The members thereof must take counsel together in such wise that no occasion for ill-feeling or discord may arise. This can be attained when every member expresseth with absolute freedom his own opinion and setteth forth his argument. Should anyone oppose, he must on no account feel hurt for not until matters are fully discussed can the right way be revealed. The shining spark of truth cometh forth only after the clash of differing opinions. If after discussion, a decision be carried unanimously well and good; but if, the Lord forbid, differences of opinion should arise, a majority of voices must prevail. (‘Abdu’l-Bahá, Cited in Shoghi Effendi, 1968, p. 21-2)

The clash of differing opinions is necessary, not the clash of personalities which causes ill-feeling and discord. Problems should be dealt with by looking at our own faults and not others, not in confrontation. Consultation also involves the sacrifice of opinions as Shoghi Effendi clearly states in a letter about spiritual assemblies.

We all have a right to our opinions, we are bound to think differently - but a Bahá’í must accept the majority decisions of his assembly realizing that acceptance and harmony - even if a mistake has been made - are the really important things. . . It is better if they submit to the majority view and make it unanimous. But they are not forced to. What they must do, however, is to abide by the majority decision, as this is what becomes effective. They must not go around undermining the assembly by saying they disagreed with the majority. In other words, they must put the cause first and not their own opinions. He can ask the assembly to reconsider a matter, but he has no right to force them or create in harmony because they won't change. Unanimous votes are preferable, but certainly cannot be forced upon assembly members by artificial methods such as are used by other societies. (1947, p. 3)

Books have been written on the principles and methods of consultation found in the Bahá’í writings (Kolstoe, 1985; Research Department of the Universal House of Justice, 1980). The principle that a group of people working together is more effective than a group of individuals working alone is not a new one. The research relating to group theory verifies the value of consultation. ‘Abdu’l-Bahá likens the family to a nation and explains the conditions necessary for proper functioning (1971, p. 100). This analogy can be applied to our schools. When any member of the school family recognizes some disunity or negative factors within the setting, a concerted effort must be put forth to remedy the situation. The strife and dissension existing in many schools today are harmful to the well-being of students and faculty.

XI-100. SAVINGS INSTITUTION FOR CHILDREN
a. teaches children to render service to humanity: SW IX:19, 329-330

XI-200. HOUSE OF JUSTICE
a. divine civilization will be one of the benefits to derive from the House of Justice: SWAB:#105, 132 1) divine civilization will train every member of society so that only a negligible few will commit a crime--training, enlightening, spiritualizing the people so that they shun criminal acts

b. every man or woman must hand over to trusted person a portion of what he or she earns for the training and education of children, with the knowledge of the Trustees of the House of Justice: TB:90

XI-300. SPIRITUAL ASSEMBLY
a. must exert every effort to educate the children from infancy in Bahá'í conduct and the ways of God so that they will thrive and flourish in counsels and admonitions of Baha'u'llah: SWAB:#97, 126

b. must provide mothers will well-planned programme for the education of their children from the earliest childhood according to the Teachings: SWAB:#113, 138

c. Spiritual Assemblies must establish schools for the instruction of boys and girls in the things of the spirit, the fundamentals of teaching the Faith, reading the Sacred Writings, learning the history of the Faith, the secular branches of knowledge, the various arts and skills, and the different languages: Shoghi Effendi, Bahá'í Education, #119, p. 48

d. Spiritual Assemblies must promote the material and the spiritual enlightenment of youth, the means for the education of children by establishing, wherever possible, Bahá'í educational institutions: Shoghi Effendi, Bahá'í Administration, p. 38

e. Spiritual Assemblies must assist the children of the poor in attainment of learning in basic subjects: Shoghi Effendi, Bahá'í Education, #121, p. 50

XI-400. BAHÁ'Í SCHOOL
a. exert every effort to make Bahá'í school famed in all respects throughout the world: SWAB:#103, 131

b. exert every effort to make Bahá'í school the cause of exalting the Word of the Lord: SWAB:#103, 131

c. schoolroom of deeper knowledge: SWAB:#107, 134

d. in every city and village schools must be established and every child in that city or village is to engage in study to necessary degree: SWAB:#109, 134-135

e. every soul that offers his aid to bring about universal education in arts and sciences in schools in every city and village is accepted at the Heavenly Threshold: SWAB:#109, 135

f. all children should wear the same kind of clothing, preferable that fabric be uniform also: SWAB:#110, 135

g. pupils should be immaculate, the more cleanly the better: SWAB:#110, 135

h. schools must be located in place where air is delicate and pure: SWAB:#110, 135

i. pupils must be courteous and well-behaved: SWAB:#110, 135

j. pupils must be constantly encouraged: SWAB:#110, 135

k. pupils must be made eager to gain summits of human accomplishment: SWAB:#110, 135

l. school of humanity: SWAB:#111, 136

m. spiritual school: SWAB:#111, 137

n. rectification and refinement of character: SWAB:#111, 137

o. thorough instruction: Ibid.

p. morals and good conduct more important than book learning: SWAB:#110, 135

q. pupils must not jest and trifle: Ibid.

r. pupils must have high aims: Ibid.

s. pupils must conduct themselves well: Ibid. 1) chaste	2) pure 3) undefiled

t. Hands of the Cause of God must watch over and protect Bahá'í schools in every way and see to their requirements: 'Abdu'l-Baha, Bahá'í Education, #65, p. 25

XI-500. ORPHANAGE
a. orphans have utmost importance, and greatest consideration must be shown them: SW VII:13, 122; SWAB:#112, 138

b. income from intestate wills, unclaimed inheritances goes to support and education of orphans: KA:#21, 26-27

c. orphans must be taught, trained, educated: SW VII:13, 122; SWAB:#112, 138

d. especially teachings of Baha'u'llah must be taught to orphans: SW VII:13, 122; SWAB:#112, 138

e. indispensable part of the Mashriqu'l-Adhkar: Letter on behalf of Shoghi Effendi, 6/26/1936, in Badi Shams, p. 54

XI-600. MASHRIQU'L-ADHKAR
a. charitable institutions, such as orphanages, free schools, hospitals for the poor are an indispensable part of the Mashriqu'l-Adhkar: Letter on behalf of Shoghi Effendi, 6/26/1936, in Badi Shams, p. 54

b. order of building the Mashriqu'l-Adhkar and its dependencies: 1)Mashriqu'l-Adhkar; 2)school for the education of orphans and the poor; 3)hospital, medical dispensary; 4)home for cripples; 5)college for higher scientific education: SW I:7, 9-10

XI-700. BAHÁ'Í SUNDAY SCHOOL
a. only one class if few students: SWAB:#125, 144

b. children of unbelievers admissible to classes: Ibid.

c. do not hold classes at the same time at which other religious associations meet: Ibid.

d. moderation in frequency of changing teachers: Ibid.

e. perseverance, firmness, steadfastness of teachers essential: SWAB:#124, 143

f. Word of God recited for children: Ibid.

g. Tablets and Teachings of Baha'u'llah read to children: Ibid.

h. train children in spirit so that they embody all perfections: Ibid.

i. instruction in Bahá'í obligations and Bahá'í conduct so that pupils understand that Bahá'í is not just a name but the truth: Ibid.


text:
Bahai Education/List of Sources

Bahá'u'lláh:
Kitab-i-Aqdas (KA) Epistle to the Son of the Wolf (ESW) Hidden Words (HW) Seven Valleys (SV) Four Valleys (FV) Gleanings from the Writings of Baha'u'llah (GL) Tablets of Baha'u'llah Revealed After the Kitab-i-Aqdas: Bisharat, Tarazat, Tajaliyyat, Kalimat-i-Firdawsiyyih, Lawh-i-Dunya, Ishraqat (TB)

'Abdu'l-Bahá:
Selections from the Writings of 'Abdu'l-Baha (SWAB) Tablets of 'Abdul-Baha Abbas,I-III (TAB) The Secret of Divine Civilization (SDC) Some Answered Questions (SAQ) The Promulgation of Universal Peace (PUP) 'Abdu'l-Baha on Divine Philosophy (ABDP) 'Abdu'l-Baha in London (ABL) Paris Talks (PT)

Shoghi Effendi:
This list yet to be created.

Compilations:
Bahá'í Education (London: Baha'i Publishing Trust), 1987 (BE) Foundations for a Spiritual Education (Wilmette: National Baha'i Education Task Force), 1995 (FSE) Badi Shams, A Baha'i Perspective on Economics of the Future (New Delhi: Baha'i Publishing Trust), 1989 (BOEF)

Star of the West (SW):
Star of the West, IV:6, 105-106 Star of the West, VII:9, 77 Star of the West, VII:15, 141-144 Star of the West, VII:18, 183-184 Star of the West, VIII:6. 60 Star of the West, IX:3, 29-30 Star of the West, IX:7, 81-88 Star of the West, IX:8, 89-96 Star of the West, IX:9, 97-104, 113-114 Star of the West, XI:19, 329-330 Star of the West, XIII:5, 102-104, 123 Star of the West, XIII:6, 144 Star of the West, XIII:7, 171-172, 177-179, 189 Star of the West, XIV:1, 3-7 Star of the West, XIV:2, 42-45,58 Star of the West, XIV:3, 73-74,83-84 Star of the West, XIV:9, 267-268,278

Review of Literature
Besides the many volumes of the writings of Bahá’u’lláh (1817-1892), ‘Abdu’l-Bahá (1844-1921), Shoghi Effendi (1896-1957), and the Universal House of Justice (1963-), several other publications by Bahá’ís and Bahá’í institutions may be consulted as sources for Baha'i education. Several documents are presently available presenting Bahá’í ideas on education to various agencies and audiences, i.e., Bahá’í Education (Research Department of the Universal House of Justice, August 1976), Position Statement on Education (Bahá’í International Community Task Force on Education, January 1989), Education for a New Namibia (NSA of Namibia, August 1990), Educational Policy: A Bahá’í Perspective (NSA of India, November 1985), and “Charter for Bahá’í Schools” (American Bahá’í, April 1990). Many other scholars and educators have written on Bahá’í education, including Hand of the Cause of God Ali-Akbar Futuran Baha'i Education for Children: Books 1-7 (BPT of India, n.d.) and Mothers, Fathers, and Children: Practical Advice to Parents (BPT of India, n.d.) and the developers of the ANISA Model (Jordan and Streets, 1972; Streets and Jordan, 1973; Kalinowski and Jordan, 1973). Other eminent researchers and educators include G. Marks, A. Jones, H. Danesh, I. Ayam, D. Troxel, D. Allen, M. Smith, H. Hanson, J. Hatcher, I. Taafaki, R. Johnson, W. Diehl, N. Rutstein, C. Miller, G. Eyford, W. Hatcher, E. Muttart (Canada), S. Waite, H. Rost, P. Lample, F. Arbab, H. Nikjoo, S. Vickers, P. Christensen, E. Anello, J. Savi, E. Tinto, M. Higgins and L. Nuguchi.

EXPANDING BIBLIOGRAPHY
‘Abdu’l-Bahá. (1916, December 12). Necessity of education - Training of the children: Words of Bahá’u’lláh and ‘Abdu’l-Bahá. Star of the West, 144.

‘Abdu’l-Bahá. (1918, July 13). Star of the West.

Abdu’l-Bahá. (1922). Promulgation of universal peace; Volume I.Chicago: Executive Board of Bahá’í Temple Unity.

‘Abdu’l-Bahá. (1930). Tablets of ‘Abdu’l-Bahá Abbas, Volume III. New York: Bahá’í Publishing Committee.

‘Abdu’l-Bahá. (1954). Some answered questions. Wilmette, IL.: Bahá’í Publishing Trust.

‘Abdu’l-Bahá. (1971). Foundations of world unity.Wilmette, IL: Bahá’í Publishing Trust.

‘Abdu’l-Bahá. (1975). The secret of divine civilization, 3rd ed. Wilmette, IL: Bahá’í Publishing Trust.

Bahá’u’lláh. (1971). Gleanings from the writings of Bahá’u’lláh.Wilmette, IL: Bahá’í Publishing Trust.

Bahá’u’lláh. (1988). Tablets of Bahá’u’lláh revealed after the Kitab-i-Aqdas. Wilmette, IL: Bahá’í Publishing Trust.

Bahá’u’lláh & ‘Abdu’l-Bahá. (1971). Bahá’í world faith. Wilmette, IL: Bahá’í Publishing Trust.

Bahá’u’lláh, Bab, and ‘Abdu’l-Bahá, 1970. Bahá’í prayers. Wilmette, IL: Bahá’í Publishing Trust.

Clarken, R. (1998). Bahá’í Teachings on Education. Unpublished manuscript.

Effendi, S. (1932, June). Bahá’í Summer Schools. Bahá’í News.

Effendi, S. (1941). The Local Spiritual Assembly. Wilmette, IL: Bahá’í Publishing Trust.

Effendi, S. (1947, December). Bahá’í News, 202, 3.

Effendi, S. (1948, August). Excerpts from letter of the Guardian to assemblies and individual believers, Baha’i News, p. 210-213.

Effendi, S. (1948a, November). Letters from the Guardian. Bahá’í News. 2-3.

Effendi, S. (1949, December). Bahá’í News, 266, 2.

Effendi, S. (1955). World order of Bahá’u’lláh. Wilmette, IL: Bahá’í Publishing Trust.

Effendi, S. (1968). Bahá’í Administration. Wilmette, IL: Bahá’í Publishing Trust.

Effendi, S. (1969). The advent of divine justice, Wilmette, IL: Bahá’í Publishing Trust.

National Bahá’í Education Task Force. (1998). Foundations for a spiritual education: Research of the Bahá’í writings. Wilmette, IL: National Spiritual Assembly of the Bahá’ís of the United States.

National Spiritual Assembly of the Bahá’ís of the United States. (1973). Bahá’í youth: A compilation.Wilmette, IL: Bahá’í Publishing Trust.

Jordan, D. & Streets, D. (1972, Spring). The Anisa model. World Order, 21-30.

Kalinowski, M. & Jordan, D. (1973, Summer). Being and becoming: The Anisa theory of development." World Order, pp. 17-26.

Kolstoe, J. (1985). Consultation. Oxford: George Ronald.

Research Department of the Universal House of Justice (Eds.). (1977). Bahá’í education. Wilmette, IL: Bahá’í Publishing Trust.

Research Department of the Universal House of Justice (Eds.). (1980). Consultation. Thornhill, Ontario: Bahá’í Canada Publications.

Rost, H. (1969). Possible Nature and Establishment of Bahá’í Universities and Colleges Based Upon Study of Bahá’í Literature, Vermillion, SD: University of South Dakota.

Streets, D. and Jordan, D. (1973, Summer). Guiding the process of becoming: The Anisa theories of curriculum and teaching, World Order, 29-40.

title: Bahai Education/List of Sources


text:
XQuery

= XQuery Examples Collection = Welcome to the XQuery Examples Collection Wikibook! XQuery is a World Wide Web Consortium recommendation for selecting data from documents and databases.

2019 refurbishment
There is a Github project to track issues with this book and collaborate amongst eXist db folk at least to bring this resource up-to-date.

Main tasks in the current refurbishment are to:

 * get example code executable again
 * remove complex case studies which use obsolete sources
 * add XQuery 3.0 examples.

Recent Changes

Search
You may search the book here:

About this Project
This is a collaborative project and we encourage everyone who is using XQuery to contribute their XQuery examples. All example programs must conform to the creative-commons-2.5 share-alike with attribution license agreement.

Execution of examples use an /eXist demo server/.
 * 1) Instructors: please sign our /Guest Registry/ if you are using this book for learning or teaching XQuery
 * 2) Contributors: please see our /Naming Conventions/ to ensure your examples are consistent with the textbook
 * 3) Learners: If you are looking for an example of a specific XQuery language construct, technique or problem but can't find an example, please add a suggestion to the /Examples Wanted/ section.

Introduction

 * 1) /Background/ - A brief history and motivation for the XQuery standard.
 * 2) /Benefits/ - Why use XQuery?
 * 3) /Installing and Testing/ - How to install an XQuery server on your system.
 * 4) /Naming Conventions/ - Naming standards used throughout this book.

Using XQuery
Common tasks in using XQuery with XML
 * 1) /Executing a script/ - Executing an XQuery script
 * 2) /Loading data/ - A tour of several different ways to load data into a native XML database

= Example Scripts =

Beginning Examples
Examples that do not assume knowledge of functions and modules.
 * 1) /HelloWorld/ - A simple test to see if XQuery is installed correctly.
 * 2) /FLWOR Expression/ - A basic example of how XQuery FLWOR statements work.
 * 3) /Sequences/ - Working with sequences is central to XQuery.
 * 4) /XPath examples/ - Sample XPath samples for people new to XML and XPath
 * 5) /Regular Expressions/ - Regular expressions make it easy to parse text.
 * 6) /Searching multiple collections/ - How to search multiple collections in a database.
 * 7) /Displaying Lists/ - How to take a list of values in an XML structure and return a comma separated list.
 * 8) /Extracting data from XHTML files/ - How to use the doc function to get data from XHTML pages.
 * 9) /Displaying data in HTML Tables/ - How to display XML data in an HTML table.
 * 10) /Limiting Result Sets/ - How to limit the number of records returned in an XQuery.
 * 11) /Filtering Words/ - How to test to see if a word is on a list.
 * 12) /Saving and Updating Data/ - How to have a single XQuery that saves new records or updates existing records.
 * 13) /Quantified Expressions/ - Testing all the items in a sequence.
 * 14) /Dates and Time/ - Sample expressions that work with date and time values

Intermediate Examples
Assumes knowledge of functions and modules.
 * 1) /Using XQuery Functions/ - How to read XQuery function documents and user XQuery functions
 * 2) /Creating XQuery Functions/ - How to create your own local XQuery functions
 * 3) /Returning the Longest String/ - A function to find the longest string from a list of strings
 * 4) /Net Working Days/ - How to calculate the number of working days between two dates
 * 5) /Tag Cloud/ - Counting and viewing the number of keywords
 * 6) /String Analysis// - Regular expression string analysis
 * 7) /Manipulating URIs/ - How to get and manage URIs
 * 8) /Parsing Query Strings/ - Parsing query strings using alternate delimiters.
 * 9) /Splitting Files/ - Splitting a large XML files into many smaller files.
 * 10) /Filling Portlets/ - How to fill regions of a web page with XQuery
 * 11) /Filtering Nodes/ - How to use the identity transform to filter out nodes and add nodes
 * 12) /Limiting Child Trees/ - You have a tree of information and you want to "prune" only at a specific level
 * 13) /Higher Order Functions/ - Passing functions as arguments to functions
 * 14) /Timing Fibonacci algorithms/ - A couple of Fibonacci algorithms and timing display
 * 15) /Using Intermediate Documents/ - Analysis of a MusicXML file
 * 16) /Formatting Numbers/ - using picture formats to format numbers
 * 17) /Uploading Files/ - how to upload files using HTML forms
 * 18) /TEI Concordance/ - How to build a TEI-based concordance
 * 19) /Queries on Tables/ - How to extract data from tabular data
 * 20) /Namespace Constructors/ - how to dynamically add namespaces when constructing documents

Search

 * 1) /Introduction to XML Search/ - An overview of XML search terminology
 * 2) /Basic Search/ - A simple search page
 * 3) /Searching, Paging and Sorting/ - Searching and Viewing search results
 * 4) /Keyword Search/ - full text search with Google-style results
 * 5) /Employee Search/ - an Ajax example
 * 6) /Lucene Search/ - using eXist's Lucene-based fulltext search
 * 7) /Advanced Search/ - creating complex searches using multiple search fields
 * 8) /Open Search/ - creating an OpenSearch file to describe your search page
 * 9) /Auto-generation of Index Config Files/ - scripts to automatically generate the index configuration file

Transformations
Using XQuery to transform between XML and other representations

 * 1) /Parsing CSV/ - Using FLWOR on sequences to parse CSV text.

Interaction

 * 1) /Getting URL Parameters/ - How to get parameters from the URL.
 * 2) /Getting POST Data/ - How to get XML data posted to an XQuery.
 * 3) /Checking for Required Parameters/ - How to check for a required parameter using if/then/else.
 * 4) /Adder/ - Retaining sate in interactions :Creating a web service that adds two numbers.
 * 5) /Chaining Web Forms/ - Passing data from one web page to another using URL parameters, sessions or cookies
 * 6) /Simple XForms Examples/
 * 7) /Incremental Search of the Chemical Elements/ - AJAX
 * 8) /Sending E-mail/ - How to send an e-mail message from within an XQuery

Visualization

 * 1) /Graph Visualization with Graphviz/
 * 2) /Google Chart Sparkline/ - Creating a Tufte Sparkline  using the Google Charts API
 * 3) /Google Chart Bullet Bar/ - Creating a bullet bar using the Google Charts API

Creating Custom Views
These examples use reflection on the structure of an XML document using name to implement generic functions for XML transformations.
 * 1) /HTML Table View/ - A generic HTML table representation
 * 2) /Tree View/ - A generic HTML tree representation
 * 3) /Grouping Items/ - how to group items in a report

Transforming Complex XML Documents
XQuery has many features that allow you to transform XML and create full document-style transformation libraries. Unlike traditional "database" documents, complex XML documents have "complex content" that includes in-line elements in unpredictable order. This section provides a foundation for these transformations based on using the XQuery typeswitch functions. Typeswitch function transformations replace XSLT transforms but can also access indexes for very fast transforms of large collections.
 * 1) /Transformation Styles/ overview of the three styles of transformation
 * 2) /Typeswitch Transformations/ Using the typeswitch function for document-style transforms.
 * 3) /Transformation idioms/ Handling transformation tasks
 * 4) /Generating Skeleton Typeswitch Transformation Modules/ Using XQuery to generate a skeleton module for typeswitch-based document transformation
 * 5) /Web XML Viewer/ Using the typeswitch function to transform an XML document to HTML

Paginated Reports
Unlike HTML pages, paginated reports use the concept of text flows between pages. These examples show you how to convert raw XML into high-quality PDF files suitable for printing. The examples use a markup standard called XSL-FO for "Formatted Objects"

 * 1) /Installing the XSL-FO module/ - update your 1.4 configuration to get the current software from the Apache web site
 * 2) /Generating PDF from XSL-FO files/ - Converting XML-FO to PDF files
 * 3) /XSL-FO Tables/ - Generating XSL-FO tables from XML files
 * 4) /Converting HTML tables to XSL-FO tables/ - use a XQuery typeswitch transform to convert HTML tables to XSL-FO tables
 * 5) /XSL-FO Images/ - Embedding images in generated (PDF) files

Content Publishing

 * 1) /Publishing Overview/ - How to transfer a document from an internal intranet server to a public web site
 * 2) /Publishing to Subversion/ - How to transfer a document from an internal intranet to a public SVN server using SSL and digest authentication

XML Document Comparison and Merging

 * 1) /Compare two XML files/ - using the eXist compare function to test to see if two XML files are exactly the same
 * 2) /XML Differences/ - displaying the difference between two XML files
 * 3) /Compare with XQuery/ - Using XQuery to Compare Lists
 * 4) /Time Comparison with XQuery/ - Using XQuery to Compare Dated Items
 * 5) /Synchronizing Remote Collections/ - Using lastModified time stamps to see what items have changed
 * 6) /Finding Duplicate Documents/ - Using a hash function to find duplicate documents

Time Based Queries

 * 1) /Time Based Queries/ - using dates and times to limit search results
 * 2) /Timing a Query/ - profiling how long a query takes

TEI documents
Text Encoding Initiative.

 * 1) /TEI Concordance/ - How to build a TEI-based concordance
 * 2) /TEI Document Timeline/ - Using Simile Timeline to visualize a TEI document

DocBook Documents

 * 1) /DocBook to HTML/
 * 2) /DocBook to PDF/
 * 3) /DocBook to ePub/
 * 4) /DocBook to Microsoft Word/

OpenOffice

 * 1) /OpenOffice to HTML/

Office Open XML

 * 1) /Office Open XML/

XML Schemas

 * 1) /XML Schema to Instance/
 * 2) /XML Schema to XForms/
 * 3) /XML Schema to SVG/

Processing Special Characters

 * 1) /Special Characters/ - dealing with newlines and other special characters.

= XQuery and other languages =

MusicXML

 * 1) /Using Intermediate Documents/ Analysing MusicXML documents
 * 2) /MusicXML to Arduino/

Python

 * 1) /XQuery and Python/

SQL

 * 1) /XQuery SQL Module/ - Calling SQL from within your XQuery
 * 2) /XQuery from SQL/ - Using XQuery to access a classic Relational database - Employee/Department/Salary

RDF/OWL

 * 1) /List OWL Classes/ - A simple XQuery script that will display all the OWL classes in an OWL file

Excel

 * 1) /Excel and XML/

JavaScript

 * 1) /Navigating Collections/ - basic AJAX
 * 2) /Employee Search/ - basic AJAX
 * 3) /DOJO data/ - basic JSON

SQL

 * 1) /XML to SQL/
 * 2) Microsoft-Access

XHTML + Voice

 * 1) /Simple RSS reader/
 * 2) /XHTML + Voice/ Twitter Radio for Opera

XSLT

 * 1) /XQuery and XSLT/ Executing an XSLT transform from within XQuery

= Data Mashups =

Authentication

 * 1) /Basic Authentication/ - Logging in to a remote web server using HTTP Basic Authentication
 * 2) /Digest Authentication/ - Logging in to a remote web server using HTTP Digest Authentication
 * 3) /OAuth/ - A standard for protecting a set of user-owed data within a web service

Wikipedia interaction

 * 1) /Wikipedia Page scraping/
 * 2) /Wikipedia Lookup/
 * 3) /Wikipedia Events RSS/
 * 4) /Wiki weapons page/

Wikibook applications

 * 1) /Wikibook index page/
 * 2) /Wikibook list of code links/

Freebase

 * 1) /Freebase/ - use XQuery to get data via JSON from Freebase

Google Docs

 * 1) /Google Docs/ - use XQuery to get data from Google Docs

Visualization

 * 1) /Graph Visualization/
 * 2) /Graphing from RDF/
 * 3) /Dataflow diagrams/
 * 4) /Sequence Diagrams/
 * 5) /Example Sequencer/ - Step-by-step tutorial

Google Charts
Although the Google Charts functions only work when you are connected to the Internet, these examples show that XQuery is an ideal tool for converting XML data into charts.
 * 1) /Google Charts/ Using XML and XQuery to generate Google Charts using REST
 * 2) /Google Chart Sparkline/ - A demonstration of how to create a chart using the Google Charts API
 * 3) /Google Chart Bullet Bar/ - A demonstration of how to a dashboard bullet bar using the Google Charts API
 * 4) /Histogram of File Sizes/ - An XQuery report that generates a histogram of file sizes

There are also sample XForms that can be used to create front-ends in the XForms Tutorial and Cookbook

Digital Dashboards
Digital dashboards are single screens that compress a great deal of information into a single web page. This section will leverage many of the Google Charts examples from the prior section.
 * 1) Dashboard Architecture - How to design dashboards that have fast response times

Page Scraping
Page scraping is the process of extracting well-formed XML data from any HTML web page. When creating mashup applications this is also known as the harvesting process.
 * 1) /Overview of Page Scraping Techniques/
 * 2) /Page scraping and Yahoo Weather/
 * 3) /UK shipping forecast/
 * 4) /BBC Weather Forecast/
 * 5) /Page scraping and Mashup/
 * 6) /Simple RSS reader/
 * 7) /Multiple page scraping and Voting behaviour/
 * 8) /Link gathering/
 * 9) /REST interface definition/
 * 10) /Caching and indexes/

Mapping

 * 1) /Google Geocoding/
 * 2) /String Analysis Mapping Car Registrations
 * 3) /Flickr GoogleEarth/
 * 4) /Nationalgrid and Google Maps/
 * 5) /SMS tracker/

Timelines

 * 1) /Creating a Timeline/ - Creating a simple timeline view of events
 * 2) /Timelines of Resource/ - Using creation and modification dates to create timelines
 * 3) /TEI Document Timeline/ - Creating a timeline of all dates within a single TEI document

The Semantic Web

 * 1) /DBpedia with SPARQL - Football teams/
 * 2) /DBpedia with SPARQL and Simile Timeline - Album Chronology/ Creating a timeline of album releases using data from Wikipedia
 * 3) /DBpedia with SPARQL - Stadium locations/
 * 4) /The Emp-Dept case study/
 * 5) /XML to RDF/
 * 6) /SPARQL Tutorial/
 * 7) /SPARQL interface/
 * 8) /Graphing Triples/
 * 9) /SPARQLing Country Calling Codes/
 * 10) /Southampton Pubs/
 * 11) /Alphabet Poster/
 * 12) /Simile Exhibit/ Browser visualizations using the Simile JavaScript libraries
 * 13) /Latent Semantic Indexing/ Finding the semantic distance between documents

= Development Tools =
 * 1) /Sitemap for Content Management System/ XQuery functions can easily perform many common web site content management functions
 * 2) /Uptime monitor// use XQuery to monitor a remote web service
 * 3) /XQuery IDE/ - XQuery Integrated development environment
 * 4) /Image Library/ - using an XQuery to preview your images
 * 5) /XML Schema to Instance/ - XQuery function to generate a sample XML instance from an XML Schema file (.xsd)
 * 6) /Lorum Ipsum text/ - generating sample text for inserting into test page layouts
 * 7) /XQuery and XML Schema/ - Generating an XML instance document
 * 8) /Generating XQDocs/ - Automating the generation of XQuery documentation for Modules and Functions
 * 9) XqUSEme - Firefox extension to allow XQueries including against the loaded document (even against originally non-XML (poorly formed) HTML).
 * 10) /Call Graphs/ - Generating an call graph as an SVG file from module introspection
 * 11) /System Properties/ - getting a list of all standard and java system properties and their values
 * 12) /Environment Variables/ - getting a list of all the external environment variables and their values
 * 13) /Generating xqDoc-based XQuery Documentation/ - generating module documentation using the xqDoc commenting standard

Validation

 * 1) /Validating a document/ - Validate a document with an XML Schema
 * 2) /Validation using a Catalog/ - Using a Catalog file to validate documents
 * 3) /Validating a hierarchy/ -
 * 4) /Validation with Schematron/ - Apply specific rules to check a document

Path Analysis

 * 1) /All Paths/ - A report of all paths in a document or collection
 * 2) /All Leaf Paths/ - A report of all leaf paths in a document or collection

Security

 * 1) /Login and Logout/ - How to log users in and log them out
 * 2) /URL Driven Authorization/ How to use URL rewriting to check for valid users
 * 3) /Digital Signatures/ - How to use a custom module to use the XML Digital Signature standards
 * 4) /Changing Permissions on Collections and Resources/ - how to change permissions on collections and resources

Unit Testing Tools

 * 1) /XUnit Testing/ - what is XUnit testing and how to set them up
 * 2) /XUnit Annotations/ - how to add annotations to your XQuery functions to drive your XUnit tests

= Case Studies =

 * 1) /Fizzbuzz/
 * 2) /Project Euler/
 * 3) /Topological Sort/
 * 4) /Slideshow/
 * 5) /Sudoku/
 * 6) /Pachube feed/
 * 7) /World Temperature records/ - conversion of text data formats to XML, indexing and data presentation
 * 8) /UWE StudentsOnline/

= eXist db specific Functions and Configuration =

Installing modules

 * 1) /Installing the XSL-FO module/

Setting HTTP Headers

 * 1) /Setting HTTP Headers/

dbutil

 * 1) /Database Utilities/ - a set of database utility functions for database administration

compression
Function Reference
 * 1) /Get zipped XML file/
 * 2) /Unzipping an Office Open XML docx file/ - Uncompressing and storing a docx file

eXgit
Module for interacting with any git revision control system
 * 1) /Installing eXgit/

EXPath File Transfer XQuery Extension Module
This module does both FTP, SFTP (using the SSH protocol) using a standardized and consistent format.
 * 1) /File Transfer Client/

ftp client
This module allows you to interact with a remote FTP server on a remote system. It includes functions for listing, getting and putting files.
 * 1) /FTP Client/

httpclient
Function Reference
 * 1) /Digest Authentication/
 * 2) /UK shipping forecast/

JSON

 * 1) /Convert XML to JSON/

Lucene
Function Reference Help
 * 1) /Lucene Search/

mail
Function Reference
 * 1) /Sending E-mail/
 * 2) /Basic Feedback Form/

math
Function Reference
 * 1) /Using the Math Module/

memcached

 * 1) /Using the Memcached Module/

process

 * 1) /Execute External Process/ - execute a shell command from within XQuery

request
Function Reference
 * 1) /Getting URL Parameters//
 * 2) /Getting POST Data//
 * 3) /Checking for Required Parameters/
 * 4) /Manipulating URIs/
 * 5) /Parsing Query Strings/
 * 6) /Adder/ simple client-server interaction

scheduler
Function Reference Help
 * 1) /XQuery Batch Jobs/

sequences
Function Reference
 * 1) /Sequences Module/ - three additional functions (map, fold and filter)

session
Function Reference
 * 1) /Basic Session Management/ - the basics of session management including getting a setting session variables

subversion
Function Reference
 * 1) /Subversion/ - how to update a subversion repository from within XQuery using the subversion client

transform
Function Reference
 * 1) /String Analysis/

util
Function Reference
 * 1) /Registered Modules/ : util:registered-modules
 * 2) /Registered Functions/ : util:registered-functions
 * 3) /Dynamic Module Loading/ : util:import-module, util:eval
 * 4) /Higher Order Functions/ : util:function, util:call
 * 5) /Timing Fibonacci algorithms/ : util:function, util:call, util:system-time
 * 6) /XMP data/ : util:binary-doc, util:binary-to-string, util:parse
 * 7) /Basic Authentication/ : util:string-to-binary, httpclient:get

validation
Function Reference Help
 * 1) /Validating a document/

xmldb
Function Reference
 * 1) /Saving and Updating Data/
 * 2) /Splitting Files/

xqdoc
Function Reference
 * 1) /Generating xqDoc-based XQuery Documentation/

xslfo
XSL-FO (Formatted Objects) is a way of converting XML into PDF. Function Reference
 * 1) /Installing the XSL-FO module/ - setting up your XSL-Module within eXist
 * 2) /Generating PDF from XSL-FO files/ - generating PDF from a FO file
 * 3) /XSL-FO Tables/ - adding tables to your PDF
 * 4) /XSL-FO Images/ - adding images to your PDF
 * 5) /XSL-FO SVG/ - adding SVG images to your PDF

Triggers

 * 1) /Using Triggers to Log Events/ - how to set up a trigger to log store, update and remove events on a collection
 * 2) /Using Triggers to assign identifiers/ - how to use triggers to assign identifiers to new documents or new nodes
 * 3) /Sending E-mail/ Email is one way to notify when a trigger has fired

XQuery Updates

 * 1) /Inserting and Updating Attributes/
 * 2) /Updates and Namespaces/ - How updates can change serialization

URL Rewriting

 * 1) /URL Rewriting Basics/ How to make your URLs look nice

Apache Ant Tasks

 * 1) /Reindex a Collection/

Replication

 * 1) /eXist Replication /

General guidance

 * /eXist Crib sheet/
 * eXist-db maintenance - delete versions of binary files

= Appendixes =

Systems that Support XQuery
Using native and hybrid XML databases that implement XQuery
 * 1)  BaseX  - Native open source XML Database with visual frontend
 * 2) /DataDirect XQuery/ - Java XQuery engine supporting relational, EDI, flat files and XML input/output
 * 3)  eXist - Open source native XML database
 * 4)  DB2 pureXML - DB2 9.1 includes the pureXML feature
 * 5)  MarkLogic Server - MarkLogic Server commercial XML Content Server
 * 6) /Microsoft SQL Server 2005/ -
 * 7) /NetKernel/ - NetKernel
 * 8) /Oracle Berkeley DB XML/ - Open source embedded storage management
 * 9)  Oracle XML DB - Oracle Server 11g includes the XML DB (XDB) feature
 * 10)  Sedna  - Open source native XML Database
 * 11) /Stylus Studio/ - XQuery mapping/editing/debugging, ships with Saxon (and SA) and DataDirect XQuery
 * 12) EMC xDB - EMC Documentum xDB commercial native XML database
 * 13) /XQilla/ - Open source XQuery library and command line utility
 * 14) Zorba - Open source XQuery engine C++ implementation with C, Java, Php, Python, Ruby library bindings and command line utility
 * 15) Qizx - Open source and pro XQuery engine Java implementation

Debugging XQuery

 * 1) /Gotchas/ - some pitfalls
 * 2) /Ah-has// - some ah-ha moments

= Other sources =

Function Libraries

 * 1) FunctX XQuery Function Library by Priscilla Walmsley

Discussion Groups

 * 1) XQuery General

= Indexes =
 * /Index of Application Areas/ - edited

Key to symbols:

indicates an XQuery/Best practice

XQuery

title: XQuery


text:
Muggles' Guide to Harry Potter/Books/Deathly Hallows/Themes

Love
Love plays a much bigger role in Voldemort's downfall than he or Harry realize. Regardless of Merope Gaunt's intentions for her son, Tom Marvolo Riddle grew up an anonymous child in an orphanage, without the unconditional love or care he would have received from his mother. Whether or not this lack of love in his life shaped him at an early age, it is certainly true that, by the time Dumbledore met him at eleven, he was already showing sociopathic qualities.

Riddle's inability to comprehend love, or the purity of it, kept him from making any real friends. When he meets his father and grandparents at 16, he does not attempt a relationship or any sort of reconciliation. Instead, he murders them all and uses their deaths to create a Horcrux.

Perhaps it is the lack of love in his early life, coupled with the missing pieces of his soul relegated to Horcruxes, that further renders him incapable of understanding love's impact. When Snape approached Voldemort and asked him to spare Lily Potter, Voldemort did make an attempt to do so. Harry's limited recollections of the night his parents were killed, and the memories of that night that Harry later receives from Voldemort, agree that Voldemort had commanded Lily to stand aside so that he could gain access to Harry. However, spurred on by her husband's death as well as her maternal instincts for her child, Lily refused, and Voldemort killed her before turning his attention to Harry.

It is Voldemort's intent to kill Lily if she gets between him and Harry, that turns Snape against Voldemort, and leads to his defection to Dumbledore and the Order of the Phoenix. Learning of Voldemort's plan to kill Harry, with the associated grave risk to Lily, Snape pleads with Dumbledore to protect her, and promises "anything" if Dumbledore will do so. Dumbledore requires Snape to turn informant against Voldemort. Lily's subsequent death at Voldemort's hands does not end the promise, and Snape remains an ally of Dumbledore's until his death. When Harry comes to school at Hogwarts, Dumbledore adds covertly ensuring Harry's safety to Snape's mission. Despite Snape's overt animosity toward Harry, probably in part caused by Harry's extremely close resemblance to James, the older man never forgets whose child Harry is, and feels duty-bound to watch over Lily's son because he loved her so much. Snape's work as a double agent allows him to pass along information about the Death Eaters to the Order of the Phoenix and thwart certain parts of Voldemort's plans. If Lily Potter hadn't been killed, Voldemort would still have had a loyal servant in Snape and Harry might have been successfully killed long ago.

It should also be noted that throughout the seventh book, Harry receives valuable information about Voldemort's actions and plans by means of the soul shard of Voldemort's that is resident in Harry. Voldemort is unable to reverse this flow of information, because of the extreme distaste he has formulated for the inside of Harry's mind. What drove Voldemort permanently out of Harry's mind was Harry's longing to be with Sirius Black again. Dumbledore had commented at the time that he believed Voldemort had found Harry's mind a very uncomfortable place to be, and that he was not surprised that Harry had had no intimations of Voldemort's presence in his mind throughout the sixth book.

The fact that Voldemort can’t feel or understand love, but that Harry can, is also very important. It is because Harry can feel love that he can reciprocate, and it is this reciprocation of love that allows Harry to be surrounded by those who will assist him in his ventures, most notably Ron, Hermione, and Ginny. Voldemort can’t feel or understand love, so those who choose to follow him do so purely for their own selfish motives, coupled perhaps with fear of what Voldemort would do to them if they went against his will. It is this same lack of understanding that blinds Voldemort to the possibility that by failing to spare Lily, he could lose his follower Snape, and this lack of ability to reciprocate love that frees Snape to act against Voldemort covertly. When Voldemort has proven by his actions that he does not care about Snape's feelings, Snape in turn feels that he is free to seek whatever help he can find to protect Lily, and the help he finds is Dumbledore. On the other hand, while Ron is unhappy enough with Harry's progress to leave him, we never think that he would be able to betray Harry. We have commented elsewhere that Harry has friends while Voldemort has followers; Harry's friends stay with him because they believe in him and his mission and want to help him, and because of this, their motivation is much stronger than those who follow Voldemort.

This is not to say that Voldemort does not know how to use love as a weapon. In one instance we are aware of, Voldemort's Death Eaters kidnap Luna Lovegood in order to pressure her father into changing the editorial tone of his newspaper, and incidentally almost manage to capture Harry by that means. Being unable to see the strength that derives from love, Voldemort likely only sees this vulnerability, and thus believes himself stronger for having nobody that he cares about.

Death
Death has played a central role in each book, and is at the heart of the final confrontation between Harry and Voldemort. Both Horcruxes, which form the main thrust of the entire series, and the Deathly Hallows, which are a major part of the story of the seventh book, are shown to be means of avoiding or mastering death.

Practically since birth, Voldemort has been attempting to discover the path to immortality. During his time at Hogwarts, Tom Riddle learns about Horcruxes. Before he is sixteen, Riddle has realized that the only way to create a Horcrux is through the murder of another, as we learn from Professor Slughorn. This scene is meant to give the appearance that Tom is learning about Horcruxes from Slughorn, but in fact, as he is already wearing the Gaunt ring at this point, he has already made his first Horcrux. As Voldemort’s greatest fear is death, he thinks nothing of killing others to save himself later on, and creates his first Horcrux through the death of Tom Riddle, his own father. Voldemort spends the next several years of his life creating Horcruxes so that when the Avada Kedavra curse backfires on him, he doesn’t succumb to death.

In direct contrast to Voldemort’s desperate attempts to avoid death are the examples of sacrificial death. Both James and Lily Potter surrender to death to save their son. During the First Wizarding War, many members of the Order of the Phoenix were killed trying to stop Voldemort’s rise to power. Several characters are also killed throughout the books, many of whom give up their lives to save others. While those fighting on Voldemort’s side are willing to do almost anything to stay alive, those with the Order of the Phoenix, such as Sirius Black and Dumbledore, understand that their lives may be needed for their cause and are willing to give them up.

Harry’s attitude toward death is usually shown as a balance between recklessness and respect. While looking into the Mirror of Erised with Professor Quirrell, Harry is able to see the Philosopher’s Stone and retrieve it because he did not seek to use it to prolong his life. Though we don't learn this until the final book in the series, in the duel in the cemetery in Harry Potter and the Goblet of Fire, Harry is actually the stronger wizard because he is prepared for death, while Voldemort fears it. Many times, Harry’s actions have led to his being in a dangerous situation, yet he has faced death bravely. When he finally works through the riddle engraved on the Snitch, "I open at the close," he realizes that the Snitch can only be opened as he is facing his death. Using the Resurrection Stone Dumbledore placed inside, Harry recalls his loved ones temporarily from death, and from their company gains the courage to face Voldemort and his own death. It is his ability to willingly die to destroy Voldemort’s seventh Horcrux that actually allows him to survive. Following Neville’s beheading of Nagini, Voldemort is no longer mortally protected, and so his last, backfiring, attempt to kill Harry results in his own final demise.

Family
Through the lens of family, the differences between Harry and Voldemort are reinforced. Harry Potter and the Philosopher’s Stone begins with Harry’s being placed with his aunt and uncle following his parent’s death. He never feels welcomed by his mother’s sister and her family and is treated as a second-class citizen. Contrasting that, Harry finds a place with Ron Weasley and his family. Almost immediately upon meeting Harry, Mr. and Mrs. Weasley show him love and affection and include him in their family. Harry ends up relying on this surrogate family for guidance and support.

Tom Riddle also grew up as an orphan: though his father was still alive, Tom was raised in an orphanage. Unlike Harry, however, Riddle never got a taste of what unconditional love was like, and never learned to trust others.

Harry’s experience with the Dursleys was apparently no better than Riddle’s time in the orphanage, though by watching the Dursleys' son Dudley and how the parents reacted to him, he was able to see directly what unconditional love could be like. One must wonder whether actually seeing the evidence of the existence of that sort of love would make the absence of it easier or harder to bear, though its absence must be made somewhat less painful by the apparent result it had on Dudley, making him self-centered and horrendously over-indulged. Yet, despite their similarly loveless "home" environments, Harry became a strong, moral member of the Wizarding World, while Riddle became Voldemort. Perhaps Harry’s parents passed on to their son favorable qualities that he could draw upon in times of personal struggle. Harry idealized his parents, while Voldemort looked upon his with disdain, killing his father as soon as he discovered who he was.


text:
XQuery/Limiting Result Sets

= Motivation = Sometimes you have many records or instances in a collection and you want to limit the amount of data returned by a query.

= Strategy =

Limiting Records in a Document
If you are limiting records in a large XML document you can do this by adding a predicate to the end of your for loop:

for $person in doc($file)/Person[position lt 10]

Using Subsequence to Limit Results
The following query retrieves only the first 10 documents, in sequential document order, contained within a collection.

for $person in subsequence(collection($my-collection)/person, 1, 10)

Where:

subsequence($sequence, $starting-item, $number-of-items)

Note that the second argument is the item to start at and the third is the total number of items to return. It is NOT the last item to return.

Sorting Before Limiting Results
Note that usually you will want to get the first N documents based on some sorting criteria, for example people that have a last name that start with the letter "A". So the first thing you must do is create a list of nodes that have the correct order and then get the first N records from that list. This can usually be done by creating a temporary sequence of sorted items as a separate FLWOR expression.

Getting the Next N Rows
After you fetch the first N items from your sequence you frequently want to get the next N rows. To do this you will need to add buttons to your report for "Previous N Records" and "Next N Records". Those buttons will pass parameters to your XQuery telling where to start and how many records to fetch.

To do this you will need to call your own script with different parameters on the URL. To keep track of the URL you can use the get-url function that comes with eXist. For example:

let $query-base := request:get-url

If your query was run from http:/localhost:8080/exist/rest/db/apps/user-manager/views/list-people.xq this is the string that would be returned.

We will also get two parameters from the URL for the record to start at and the number of records to fetch:

let $start := xs:integer(request:get-parameter("start", "1")) let $num := xs:integer(request:get-parameter("num", "20"))

Now we will create two HTML buttons that allow us to get next N records or the previous N records.

Full Example Program

title: XQuery/Limiting Result Sets


text:
XQuery/Filling Portlets

Motivation
You want to be able to create reports that work with industry standard portals. These systems have standard div tags with class attributes that are standardized.

For example the searchbox for a page will have the following XHTML:

Method
We will create a report that is structured as a set of divs with the appropriate class tags. We can then take the URL for this report and add it to the portal management system. Our report will automatically be styled according to the central portal style sheet.

Portal software allows These divs need to be filled by XQueries:
 * portal-wrapper
 * portal-top
 * portal-header
 * portal-breadcrumbs
 * portal-searchbox
 * portal-advanced-search
 * portal-footer
 * portal-colophon
 * portal-personaltools

title: XQuery/Filling Portlets


text:
XQuery/Manipulating URIs

= Motivation = Sometimes you need to be able to manipulate the URI of your own XQuery. This is useful when you need to call your own XQuery with different parameters. For example if you have an XQuery that returns the first 20 rows in a query but you want to add a Get Next 20 Records button you may want to simply call yourself with additional parameters for what record to start with, in this case start at record 21.

This program demonstrates some XQuery functions that are not part of the original XQuery specification but are required for precise web server XQuery functionality.

The functions are:
 * /eXist/ request:get-uri - Returns the URI of the current request within the web server. For example
 * /eXist/ request:get-url - Returns the full URL including the server and port.
 * /eXist/ request:get-query-string - Returns the full query string passed to the servlet (without the initial question mark).
 * /eXist/ system:get-module-load-path - returns the path to the place where a module has been loaded from
 * /eXist/ system:get-exist-home - returns the base of the eXist web root

=Sample Program=

title: XQuery/Manipulating URIs


text:
User:Mattb112885/Useful Links for Newcomers

Wiki syntax

 * Using Wikibooks
 * How to start a book
 * WKs new book guide
 * TeX

Wikibooks Policies

 * Neutral Point of View
 * Naming Convention

Categories

 * Category:Wikibooks guidelines
 * Category:Wikibooks policies
 * Category:Wikibooks proposed policies and guidelines


text:
Template:Cookbook search

 Search the Cookbook:

ka:თარგი:კულინარული წიგნის საძიებო

title: Template:Cookbook search


text:
Chess Opening Theory/1. d4/1...d5/2. c4/2...e6/3. Nc3/3...Nf6/4. Nf3/4...c6

= Semi-Slav Defence =

Theory table
'''1. d4 d5 2. c4 e6 3. Nf3 Nf6 4.Nc3 c6'''


text:
User talk:58.104.126.96

Stop the vandalism
Quit making new pages that just say stuff like SEx SEx SEX. It's a surefire way to get you blocked. Mouse is back 04:31, 11 August 2007 (UTC)

 * [[Image:Octagon-warning.svg|left|30px]] You have been blocked from editing Wikibooks  as a result of your .  Please note that page blanking, addition of random text or spam, deliberate misinformation, privacy violations, personal attacks; and repeated, blatant violations of our neutral point of view policy are considered vandalism. If you wish to make useful contributions, you are welcome to come back after the block expires. Az1568(Talk) 04:42, 11 August 2007 (UTC)

title: User talk:58.104.126.96


text:
Reaktor/Projects/BeatMashery

= Beat Mashery =

This page is for gathering the information from this thread on the Reaktor Forums and for documenting the planning and implementation of beat mashing / editing tools.

Ideas and Inspiration
The GURU drum machine has some nice editing features, such as click / drag to create a row of hits with up / down dragging changing the timing of the hits (8ths, 16ths etc..) then if the SHIFT key is held down, up / down dragging can create velocity fades.

Instruments
Dave Pape suggested working on 3 components that each handle a major part of the process

 * 1) Break Slicer
 * 2) Chop-player (Sequencer)
 * 3) Sample-player

Break Slicer
Automatic slicer using threshold with user control for slice points.

Creates map across keyboard for use in the sample player

 * Single Hits
 * Processed single hits : Need to define a set of processes, tag which hits are interesting
 * Break Sections

For the processed hits section maybe look at how to generate them as .wav / .aiff files as well.

Sequencer
Something like an event table containing blocks of MIDI data: rolls, filter sweeps etc

 * Automatic layout of all hits from the sample map
 * Each row can have a different quantize setting which is easy to adjust while editing
 * Keyboard modifiers for preset and custom row patterns

Row Patterns
Have a set of predefined patterns and custom patterns. Hold down key (or select from list) to activate pattern, mouse click inserts selected pattern at cursor position.

Maybe have option for 'wrap pattern' so that patterns that go off the right edge wrap back to the start.

Controller Data
Preset lanes for controllers like cutoff, pitch shift. Ideally allow adding custom lanes to control anything, see the EVENT BUS from the user lib.

Sample Player
Sample-based instrument containing a sample map made from the output of the Break Slicer. Plays MIDI from the sequencer.

title: Reaktor/Projects/BeatMashery


text:
Cookbook:Mini English Muffin Pizzas

Ingredients

 * 4 English muffins
 * 1 cup pizza sauce (store-bought)
 * 1 package pepperoni
 * 2 cups mozzarella cheese

Procedure

 * 1) Slice English muffins in half.
 * 2) Spoon 1 tbsp pizza sauce on each English muffin half and spread evenly.
 * 3) Place 4 pepperoni slices on each English muffin half.
 * 4) Cover each mini pizza with ¼ cup mozzarella cheese.
 * 5) Bake at 350°F (175°C) for 10 minutes/
 * 6) Let cool then eat.

title: Cookbook:Mini English Muffin Pizzas


text:
File:Nocino.jpg

Source: http://www.toschi.it/

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image. The owners of the trademark and the image are acknowledged.

/Images

title: File:Nocino.jpg


text:
File:Lazzaroni amaretto.jpg

Source: http://www.vinoteka.com.pl/

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image. The owners of the trademark and the image are acknowledged.

/Images

title: File:Lazzaroni amaretto.jpg


text:
File:Nocello.jpg

Source: http://www.toschi.it/

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image. The owners of the trademark and the image are acknowledged.

/Images

title: File:Nocello.jpg


text:
File:Ponche Kuba.jpg

source: http://www.ponchekuba.com/

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image. The owners of the trademark and the image are acknowledged.

/Images

title: File:Ponche Kuba.jpg


text:
File:Ponche Caribe.jpg

source: http://www.leanez.com/products-ponchecaribe.htm

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image. The owners of the trademark and the image are acknowledged.

/Images

title: File:Ponche Caribe.jpg


text:
File:Drumgray.jpg

source: http://www.royalmilewhiskies.com/product.asp?pf_id=0010000003536

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image.

/Images

title: File:Drumgray.jpg


text:
File:Baileys Irish Cream.jpg

source: http://www.877spirits.com/static/page.asp?isSharedItem=N&pitem=137&current_page=&category=

Non-free use rationale
This image meets the following non-free use criteria:-
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image.

/Images

title: File:Baileys Irish Cream.jpg


text:
File:Amarula.jpg

source: http://african-tradition.com/wine/popup_image.php?pID=77&osCsid=75a8e290d704ea1e21bdc942077983c9

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. All non-free images were obtained from company websites or online businesses selling that product. The source of the file is listed under the image.

/Images

title: File:Amarula.jpg


text:
File:Ponche Diva.jpg

source: http://www.cocktailsoftheworld.com/uploads/pics/ponchediva.jpg

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image. The owners of the trademark and the image are acknowledged.

/Images

title: File:Ponche Diva.jpg


text:
File:StBrendan s750.jpg

source: http://www.cocktailsoftheworld.com/uploads/pics/StBrendan_s750.jpg

Non-free use rationale
This image meets the following non-free use criteria:
 * No free alternative possible
 * If this is a promotional image from the company, then any "user-supplied" image whose sole purpose was clearly to represent the same copyrighted box/item art (and nothing else, and with no significant artistic input- i.e. a "mechanical" reproduction, whether by scanner or camera) would likely have the same restrictions.
 * Is being used to demonstrate the product and/or its marketing
 * Serves to demonstrate the product being discussed rather than being used in a solely decorative manner.
 * Does not deprive company of ability to make money in any way
 * Is not being used in misleading or misrepresentative manner

Disclaimer

 * Use of this non-free image of a proprietary product is not an endorsement of that product or the internet business from which the image was obtained. This image was obtained from a manufacturer's website or an online business selling that product. The source of the file is listed under the image.

/Images

title: File:StBrendan s750.jpg


text:
Talk:CSS Programming/Linked

This is how my copy of Dreamweaver MX links CSS files:

<style type="text/css"> <!-- @import url(relativeURL); --> </style>

Is this not technically valid according to web standards? I ask because it is not included in this book. If it is valid, then I think that it should be included. Or is this not even the right place to ask this? GovernmentMan 10:33, 11 August 2007 (UTC)

title: Talk:CSS Programming/Linked


text:
User talk:Uwe a

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 10:41, 11 August 2007 (UTC)

title: User talk:Uwe a


text:
User talk:Marvotron

Welcome
Hello, welcome to Wikibooks!

 * Wikibooks is a collection of open-source textbooks. Find out what this means.
 * To sign your name (on talk pages), use four tildes, like this: ~~~~
 * For help in using the wiki, see the editing guide.
 * Explore, be bold, and have fun!
 * For site news, see the Bulletin board.

Explore, be bold in editing pages, and have fun!

Come introduce yourself at the new users page. If you have any questions, you can ask there or you cancontact me personally on my talk page. Just hit the "+" sign on the top of either page, and enter your question! Urbane  (Talk)   (Contributions)  10:58, 11 August 2007 (UTC)

title: User talk:Marvotron


text:
User talk:Cplkent35

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. -- Herby talk thyme 11:38, 11 August 2007 (UTC)

title: User talk:Cplkent35