OpenLLM-France/wikimedia huggingface dataset:
# XSLTForms/HelloWorld

If XSLTForms is installed correctly, the following form (or something very similar to it) should work.
Notes:
The form includes an xml-stylesheet processing instruction (line 1, highlighted). The value of the href pseudo-attribute should be a relative reference to the xsltforms.xsl stylesheet. The example assumes that the XSLTForms library is installed in the subdirectory xsltforms; the value of the relative reference will need to vary depending on the relative location of the library, vis-a-vis the location of the form. In another context, for example, the processing instruction might read <?xml-stylesheet href="../../../lib/xsltforms-1.0RC2/xsltforms.xsl" type="text/xsl"?>.
# XSLTForms/Instance Loading

An easy error to make is to give the wrong URI when pointing to an external instance (in the src or resource attribute).
Symptom: If the URI cannot be dereferenced, XSLTForms will raise an xforms-link-exception; normally, this will result in a popup window reporting an XSLTForms Exception: Error dispatching event 'xforms-model-construct' : xforms-link-exception.
Possible diagnosis: An instance cannot be loaded.
Actually, xforms-link-exception may also arise in other contexts, as well, so this diagnosis is not certain. One way to confirm it is to comment out the xf:instance element(s), one at a time, to see what happens. If commenting out an instance causes no change, that instance is unlikely to be the problem. If the instance is the source of the link error, commenting it out will normally cause the xforms-link-exception to be replaced by xforms-bind-exceptions.
Fix: get the URI right.
# XSLTForms/Introduction

XSLTForms is a client-side implementation of XForms. It requires no plug-in in the browser, and it requires no special software on the server.
XSLTForms implements XForms by using XSLT to transform an input XHTML + XForms document to an XHTML+Javascript (AJAX) document; the XSL transformation is unique to XSLTForms.
The transformation can be run wherever an XSLT 1.0 engine is available. Some users run the transform server-side, using Apache and PHP; IIS and .NET; Jetty; or eXist). Others run it client-side, in the user's browser, using the XSLT engines built into Internet Explorer, Mozilla FireFox, Opera, Chrome, and Safari.
XForms is a technology for XML-based forms. It is defined by a specification developed by the World Wide Web Consortium, and many users of XForms use it for forms on the Web, but XForms is designed as a vocabulary module that can be plugged into any host XML vocabulary. One of the most widely used implementations of XForms is embedded in Open Office and uses the Open Document Format (Open Office's XML) as its host vocabulary. For an introduction to XForms you may want to consult a general introduction to the technology (several books have been published on paper and on the Web, including a WikiBook on the subject); in its current state this wikibook mostly focuses on topics specific to the XSLTForms implementation of XForms and won't suffice for you to learn XForms on your own.
This wikibook describes XSLTForms and its use as an XForms implementation. It begins with an introductory section that provides some background information on the package, then continues with some beginning examples. Later sections describe the use of XSLTForms with various HTTP servers and the solutions to common problems. The largest section of the wikibook is a description of the current status of XSLTForms, describing features implemented and not implemented, extensions to the specification and how to use them, and listing known restrictions of the implementation. Note that because XSLTForms is actively maintained, the status section has a disappointing tendency to fall out of date. You may have to take what it says with a grain of salt, and some of the limitations listed there may have been lifted by the time you read this book.
# XSLTForms/Form not correctly rendered

There may be many reasons a form is not correctly rendered.
For XForms embedded in XHTML documents, the following causes are common and easy to check for.
1. Bad MIME type
For XForms embedded in HTML documents, one common reason is that the document in question is being served with MIME type text/html instead of application/xml, text/xml, application/xhtml, application/xhtml+xml, or another appropriate MIME type. [Cross reference to proper discussion of XForms MIME types needed here.]
When the document is served with an XML-related MIME type recognized by the browser, the browser will apply the XSLTForms stylesheet, which transforms the form into XHTML which the browser will understand natively, plus Javascript functionality to produce the prescribed XForms behaviors. When the document is served without an appropriate MIME type, no transformation will be undertaken, and the XForms controls will typically not be rendered.
The final control over what MIME type is associated with a document served by a Web server lies within the server's configuration. If you understand how to configure your server, you can control it however you like. If you don't, then the easiest approach is to rename the form from myform.html to myform.xhtml or myform.xml. This exploits the common default associations of MIME types with file extensions.
Renaming the file also typically works for documents in the file system.
2. No xml-stylesheet processing instruction
Make sure you have a stylesheet pointer, with a form something like:
3. xsltforms.xsl not found
Make sure the href pseudo-attribute in your xml-stylesheet processing instruction points to the right place.
# 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/rest/db/test/my-query.xq
* eXist request:get-url - Returns the full URL including the server and port.
http://www.example.com:8080/exist/rest/db/test/my-query.xq
* 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
# XQuery/Microsoft-Access

NOTICE: as of java 8 the JDBC-ODBC bridge has been removed. Therefore, this may not work as expected in eXist versions after 2.2
How to access a Microsoft Access database using the SQL library--
Use the sql:get connection function Use the sun JDBC/ODBC driver string "sun.jdbc.odbc.JdbcOdbcDriver" Specify a jdbc-style URL Specify the path name to the mdb file
Example program
Note that this library converts Access' quirky UTF-16 to UTF-8. Other libraries do not do this.
Posted to the eXist list by W.S. Hager on May 17th, 2014
# XQuery/Naming Conventions
## Guidelines for wikibook authors

Our goal is to allow many people to contribute examples but allow our readers a consistent user experience. In that light we would like all of our authors to use some of the following standards.
This book has a strong focus on learning some aspect of XQuery via examples. Our hope is to have a large collection of small sample XQuery programs. Each program should have the minimal code to demonstrate some aspect of XQuery. Although most of our users use eXist, we hope the examples can be used with MarkLogic, BaseX and other XQuery systems.
Make sure you use the source tags to surround your code. If it is XML code use the lang="xml" attribute.
Try to keep the examples as simple as you can to demonstrate the core concepts of your examples.

## Sample XQuery File

Each XQuery file should begin with the word xquery and the version number.
Complex XQueries should have comments using the XQuery comments

## File Name Conventions

Please use three space characters to indent your XQuery and XML examples. Do not use tabs. We use three characters because we use PDF output of these books and the printed pages have limited width.
Please do not exceed 70 characters per line. This helps formatting for printed versions of this Wikibook.
For XQuery scripts are stored inside the database please use the .xq suffix.
If you are running on a system that MUST be compatible with the three-letter Microsoft DOS file name extension please use the .xql file suffix.
For XQuery modules please use the suffix .xqm.
For each module that has unit tests use the suffix -test.xq.
# XQuery/Nationalgrid and Google Maps

In the UK, the XML standard for the exchange of timetable information is TransXchange. The location of, for example, bus stops, is expressed in Northings and Easting on the UK National Grid. To plot these on, say , Google Maps requires these coordinates to be transformed into latitude and longitude using the WGS84 datum.

## TransXChange

Here is an extract from the beginning of a typical timetable document showing a single StopPoint definition:

## Coordinate transformation

Transformation from OS National Grid Coordinates to WSG84 latitudes and longitudes used in GoogleMaps requires two kinds of transformation:
* between latitude and longitudes on an ellipsoidal model of the Earth and the Transverse Mercator projection used for the OS
* between the latitude/longitude coordinates based on on different ellipsoids used in the OS coordinates and the global WGS84 coordinates.
An XQuery module which contains these functions and other utility functions is available in the Github .

## Conversion from TransXChange

As an example of the use of these functions, the following script converts the StopPoints of a TransXChange file to a simpler format with lat/long coordinates. Here a local correction is required for more accurate local registration.
Convert

### Output

The output of this transformation contains StopPoints e.g.

## Mapping the bus stops

One application of this extracted data would be to plot the stops within a given range of a location. This requires a distance calculation which is good enough for small distances :
To generate the kml file:
Stops within half a mile of my home as KML. On GoogleMaps the stops appear to be closely aligned to the bus stop overlay, presumably generated from the same base locations.

## Icons

Selecting Icons for kml is eased if you can easily browse them. Here is a simple browser in XQuery:
Browse kml icons
# XQuery/Navigating Collections
## Motivation

You want to browse collections using an HTML web page and narrow your choices as you type.

## Method

We will first create a server-side script that takes a single parameter. This is the collection path that the user is entering into an input field in a web page. With each character the user types the list of possible sub-collections is narrowed.
There are three parts to this script: 1) the server side XQuery script 2) the HTML form 3) the JavaScript file that implements the JavaScript with AJAX functions.
# XQuery/Multiple page scraping and Voting behaviour

Often the necessary data is spread over multiple web pages.
Here is an example where data is taken from multiple pages to gather together the voting behaviour of a member in the US House of Representatives.
An index of the issues in any session of the House are provided by pages such as . For here, one can see that the pages reporting on any of sequentially numbered votes are generated by queries such as
The results are returned as an XML page rendered in a browser using XSLT. The XQuery doc function retrieves the underlying XML.
The following query aggregates the voting behavior for a specific member over 6 specific votes:
Execute
More generally, the following function will return an XML node containing the extracted data. In general the vote pages encode the roll number with leading zeros, with minimum length of 3 digits:
Execute
Note. It would be preferable to use the asp endpoint since this does not involve the complication arising here from leading zeros, but that produces mal-formed XML (??)
# XQuery/Namespace Constructors
## Motivation

You want to dynamically create namespaces within a document.

## Method

Use the XQuery namespace constructor. It has the format very similar to the element and attribute constructors:

## Acknowledgement

This example was contributed by Loren Cahlandar in Dec. of 2013
# XQuery/MusicXML to Arduino
## Motivation

You want to play music available in MusicXML format on an Arduino.

## Approach

Fetch the Music XML file (either plain XML or compressed) and transform one monophic part to code to be included in an Arduino sketch.

## Examples

* Good King Wensceslas
* HTML Form interface
# This Quantum World/Appendix/Taylor series
#### Taylor series

A well-behaved function can be expanded into a power series. This means that for all non-negative integers $k$ there are real numbers $a_{k}$ such that
    $f(x)=\sum _{k=0}^{\infty }a_{k}x^{k}=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+\cdots$
Let us calculate the first four derivatives using $(x^{n})'=n\,x^{n-1}$:
    $f'(x)=a_{1}+2\,a_{2}x+3\,a_{3}x^{2}+4\,a_{4}x^{3}+5\,a_{5}x^{4}+\cdots$
    $f''(x)=2\,a_{2}+2\cdot 3\,a_{3}x+3\cdot 4\,a_{4}x^{2}+4\cdot 5\,a_{5}x^{3}+\cdots$
    $f'''(x)=2\cdot 3\,a_{3}+2\cdot 3\cdot 4\,a_{4}x+3\cdot 4\cdot 5\,a_{5}x^{2}+\cdots$
    $f''''(x)=2\cdot 3\cdot 4\,a_{4}+2\cdot 3\cdot 4\cdot 5\,a_{5}x+\cdots$
Setting $x$ equal to zero, we obtain
    $f(0)=a_{0},\quad f'(0)=a_{1},\quad f''(0)=2\,a_{2},\quad f'''(0)=2\times 3\,a_{3},\quad f''''(0)=2\times 3\times 4\,a_{4}.$
Let us write $f^{(n)}(x)$ for the $n$-th derivative of $f(x).$ We also write $f^{(0)}(x)=f(x)$ — think of $f(x)$ as the "zeroth derivative" of $f(x).$ We thus arrive at the general result $f^{(k)}(0)=k!\,a_{k},$ where the factorial $k!$ is defined as equal to 1 for $k=0$ and $k=1$ and as the product of all natural numbers $n\leq k$ for $k>1.$ Expressing the coefficients $a_{k}$ in terms of the derivatives of $f(x)$ at $x=0,$ we obtain
This is the Taylor series for $f(x).$
A remarkable result: if you know the value of a well-behaved function $f(x)$ and the values of all of its derivatives at the single point $x=0$ then you know $f(x)$ at all points $x.$ Besides, there is nothing special about $x=0,$ so $f(x)$ is also determined by its value and the values of its derivatives at any other point $x_{0}$:
# This Quantum World/Cover
## About this book

Since 1999 I have taught an introductory course of contemporary physics to high-school students (grades 11-12) and undergraduates at the Sri Aurobindo International Centre of Education (SAICE) in Pondicherry, India. The SAICE is not your typical high school or college. While the students enjoy an exceptional freedom to choose their projects and courses, the teachers are free to offer subjects of their own choosing and are encouraged to explore new methods of teaching. My course is therefore optional. It is suitable for anyone with an interest in what contemporary physics is trying to tell us about the "nature of Nature." To students of physics it offers a perspective that is complementary to those of many excellent textbooks.
Every year at the beginning of the new term I revise and try to improve the material I hand out to my students. These revisions are to a considerable extent based on student feedback. I am presently preparing the handouts for the next term and intend to simultaneously make them available in these pages, hoping for additional valuable feedback from the Wikibooks community.
Postscript: I have not been able to add chapters and sections as fast as I would have liked, but it's going to happen. I haven't given up on this project!--Koantum 03:05, 27 September 2007 (UTC)
# Authors

List authors here.
# This Quantum World/Appendix/Sine and cosine
#### Sine and cosine

We define the function $\cos(x)$ by requiring that
    $\cos ''(x)=-\cos(x),\quad \cos(0)=1$ and $\cos '(0)=0.$
If you sketch the graph of this function using only this information, you will notice that wherever $\cos(x)$ is positive, its slope decreases as $x$ increases (that is, its graph curves downward), and wherever $\cos(x)$ is negative, its slope increases as $x$ increases (that is, its graph curves upward).
Differentiating the first defining equation repeatedly yields
    $\cos ^{(n+2)}(x)=-\cos ^{(n)}(x)$
for all natural numbers $n.$ Using the remaining defining equations, we find that $\cos ^{(k)}(0)$ equals 1 for k = 0,4,8,12…, –1 for k = 2,6,10,14…, and 0 for odd k. This leads to the following Taylor series:
    $\cos(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n}}{(2n)!}}=1-{x^{2} \over 2!}+{x^{4} \over 4!}-{x^{6} \over 6!}+\dots .$
The function $\sin(x)$ is similarly defined by requiring that
    $\sin ''(x)=-\sin(x),\quad \sin(0)=0,\quad {\hbox{and}}\quad \sin '(0)=1.$
This leads to the Taylor series
    $\sin(x)=\sum _{n=0}^{\infty }{\frac {(-1)^{n}x^{2n+1}}{(2n+1)!}}=x-{x^{3} \over 3!}+{x^{5} \over 5!}-{x^{7} \over 7!}+\dots .$
# Traditional Chinese Medicine/Clearing The Upper And Warming The Lower Part Of The Body

* Huang Lian Tang
* Wu Mei Wan
back to :
# Traditional Chinese Medicine/Da Cheng Qi Tang

The formula Da Cheng Qi Tang, designed to drastically purge heat accumulation, consists of the following:
| No. | Pinyin | Simplified Chinese | Grams |
| 1 | Da Huang | 大黄(药用大黄) | 12 |
| 2 | Hou Po | 厚朴 | 12 |
| 3 | Zhi Shi | 枳实 | 12 |
| 4 | Mang Xiao | 芒硝 | 9 |
back to :
* Purgative Method With Bitter And Cold Herbs
* Formula Design
* Prescriptions
# Traditional Chinese Medicine/Da Huang Fu Zi Tang

The formula Da Huang Fu Zi Tang, designed to warm yang to dispel cold, and remove stagnation to relieve constipation, consists of the following:
| No. | Pinyin | Simplified Chinese | Grams |
| 1 | Da Huang | 大黄(药用大黄) | 9 |
| 2 | Fu Zi | 附子 | 9 |
| 3 | Xi Xin | 细辛 | 3 |
back to :
* Removing Stagnancy By Warming Yang
* Formula Design
* Prescriptions
# Traditional Chinese Medicine/Da Huang

* Pinyin Name: Da Huang
* Literal Name: "big yellow," "greater yellow root"
* Alternate Chinese Names: Jiang Jun, Chuan Jun, Jín 讥Ten
* Original Source: Shen Nong Ben Cao Jíng (Divine Husbandman's Classic of the Materia Medica) in the
second century
* English Name: rhubarb root
* Botanical Name: Rheum palmatum L. (Zhang Ye Da Huang)j Rheum tangutícum Maxim ex Balf. (Tang Gu Te Da Huang)j or Rheum officínale Baill. (Da Huang)
* Pharmaceutical Name: Radix et Rhizoma Rhei
* Properties: bitter, cold
* Channels Entered: Spleen, Stomach, Large intestine, Liver, Heart
# Traditional Chinese Medicine/Da Jian Zhong Tang

The formula Da Jian Zhong Tang, designed to warm the middle-jiao and tonify deficiency, lower the adverse flow of qi and relieve pain, consists of the following:
| No. | Pinyin | Simplified Chinese | Grams |
| 1 | Shu Jiao | 蜀椒 | 3 |
| 2 | Gan Jiang | 干姜 | 12 |
| 3 | Ren Shen | 人参 | 6 |
| 4 | Yi Tang | 饴糖 | 30 |
back to :
* Strengthening The Spleen By Warming The Middle-jiao
* Formula Design
* Glossaries
* Prescriptions
# Traditional Chinese Medicine/Clearing Away Heat With Pungent And Cold Herbs

* Bai Hu Tang
* Bai Hu Jia Ren Shen Tang
* Bai Hu Jia Gui Zhi Tang
* Zhu Ye Shi Gao Tang
* Xin Yi Qing Fei Tang
back to :
# Traditional Chinese Medicine/Cooling Blood By Clearing Up Yingfen

* Qing Ying Tang
* Qing Gong Tang
* Xi Jiao Di Huang Tang
* Ge Gen Hong Hua Tang
back to :
# Traditional Chinese Medicine/Clearing Away Summer Heat

* Qing Shu Yi Qi Tang
* Liu Yi San
back to :
# Traditional Chinese Medicine/Da Xian Xiong Tang

Da Xian Xiong Tang consists of the following:
* Da Huang (Radix et Rhizoma Rhei) 10g
* Mang Xiao (Natrii Sulfas) 10g
* Gan Sui (Radix Kansui) 1g
Note: This formula is used in TCM to induce bowel movement, and once this is achieved, its use is immediately discontinued.
# WebObjects/EOF/Using EOF/Schema Changes
#### Christian Pekeler

James Seigel and I have written an article that might be of interest to this group. We describe a simple method for encoding structural changes to a database as objects. These objects can be used by applications to automatically bring their databases up-to-date on startup. We include example source code for WebObjects, usage patterns, and the lessons we have learned. Check it out:
http://www.stepwise.com/Articles/2005/DBChanges
# WebObjects/EOF/Using EOF/The EOF Commandments

Some things to avoid when working with EOF. Some of these things are contraindicated in Apple documentation, others are not. But all are things that experience shows EOF does not expect, and can lead to all sorts of trouble, including mysterious exceptions, and EOF getting confused about what changes must be saved to the database.
* Don't set EO properties in the EO constructor -- use awakeFromInsertion(...) or awakeFromFetch(...) instead.
* Don't do anything to an EO before inserting it into an editing context. Always insert EOs into ECs immediately. See rule #1.
* Don't modify any EO properties in validateFor...(...) methods. Doing this in validateValueForKey(...) is ok as ChuckHill noted in the list.
* If over-riding awakeFromInsertion(...), remember to call ther superclass implementation. Same with awakeFromFetch(...).
* Don't change the behavior of methods that EOF uses. For example, do not override to-many relationships to return a sorted list of the related objects. Make another method to do this.
* Don't use EOF in model class static initializers. Doing so forces EOF into operational mode before the frameworks are initialized. Use lazy loading of the entity instead.
* Don't use mutable classes (e.g. NSMutableArray, NSMutableDictionary, any other class that can change internal state after creation) as attributes. If you want this effect, use immutable classes and provide cover methods to replace the immutable instance with an updated instance. You and EOF will be much, much, much happier. e.g.
# WebObjects/Foundation

Provides a set of robust and mature core classes, including utility, collection, key-value coding, time and date, notification, and debug logging classes.
# WebObjects/LEWOStuff

Note: This framework has been discontinued.
LEWOStuff is a framework for aiding the general development of WebObjects and java software products and vertical solutions. It has been developed by Andrew Lindesay for his projects and is generally used by him and his clients. It is released under a BSD-style license and so is effectively an open-source project which can be used at your own risk. Please read the license distributed with the framework for further details on the usage of this software.
The framework has been used on a handful of application server projects which are deployed in the Australia / New Zealand region. There is presently no support for collaboration on source code, but any corrections or suggestions would be welcome. A new source distribution is generally released every few months. An overview PDF document is distributed with the framework and this covers basic architecture as well as the general functionality afforded by the framework.

## Download and Info

You can obtain the most recent public distribution from the Lindesay Electric website at http://www.lindesay.co.nz/. Click on LEStuff.

## lejstuff

lejstuff is a java library for J2SE development which is suitable for the development of general java software.

## LEWOStuff

LEWOStuff is a java framework for aiding the development of WebObjects application server development. The framework includes and extends many aspects of lejstuff mentioned above.

## LECocoaStuff

LECocoaStuff is an Objective-C framework for aiding the development of Cocoa client applications.