summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-09-18 14:36:02 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-09-18 14:49:41 (GMT)
commit470d214a5e363fc7035932fe46a5711b2b20c354 (patch)
tree106ebc5b7a1edf2f27220a7b8af5b56724605385 /doc/src
parentd5db1f2bb5d520277f5d3ddfa5a50c385aebc753 (diff)
downloadQt-470d214a5e363fc7035932fe46a5711b2b20c354.zip
Qt-470d214a5e363fc7035932fe46a5711b2b20c354.tar.gz
Qt-470d214a5e363fc7035932fe46a5711b2b20c354.tar.bz2
Doc: Language and style fixes to the XML Patterns documentation.
Reviewed-by: Trust Me
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc78
-rw-r--r--doc/src/xml-processing/xquery-introduction.qdoc40
2 files changed, 20 insertions, 98 deletions
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
index 7f4c89b..2d5babb 100644
--- a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
@@ -248,8 +248,8 @@ declare variable $insertion := "example";
declare default element namespace "http://cookbook/namespace";
let $docURI := 'cookbook.xml'
return if(doc-available($docURI))
- then doc($docURI)//recipe/<resept>{./node()}</resept>
- else <resept>Failed to load {$docURI}</resept>
+ then doc($docURI)//recipe/<oppskrift>{./node()}</oppskrift>
+ else <oppskrift>Failed to load {$docURI}</oppskrift>
//! [40]
//! [41]
@@ -312,79 +312,5 @@ for $a in doc('doc.txt')//p
<p>f0</p>
//! [49]
-//! [100]
-<?xml version="1.0" encoding="UTF-8"?>
-<cookbook>
- <recipe xml:id="MushroomSoup">
- <title>Quick and Easy Mushroom Soup</title>
- <ingredient name="Fresh mushrooms"
- quantity="7"
- unit="pieces"/>
- <ingredient name="Garlic"
- quantity="1"
- unit="cloves"/>
- <ingredient name="Olive oil"
- quantity="2"
- unit="tablespoons"/>
- <ingredient name="Milk"
- quantity="200"
- unit="milliliters"/>
- <ingredient name="Water"
- quantity="200"
- unit="milliliters"/>
- <ingredient name="Cream"
- quantity="100"
- unit="milliliters"/>
- <ingredient name="Vegetable soup cube"
- quantity="1/2"
- unit="cubes"/>
- <ingredient name="Ground black pepper"
- quantity="1/2"
- unit="teaspoons"/>
- <ingredient name="Dried parsley"
- quantity="1"
- unit="teaspoons"/>
- <time quantity="20"
- unit="minutes"/>
- <method>
- <step>1. Slice mushrooms and garlic.</step>
- <step>2. Fry mushroom slices and garlic with olive oil.</step>
- <step>3. Once mushrooms are cooked, add milk, cream water. Stir.</step>
- <step>4. Add vegetable soup cube.</step>
- <step>5. Reduce heat, add pepper and parsley.</step>
- <step>6. Turn off the stove before the mixture boils.</step>
- <step>7. Blend the mixture.</step>
- </method>
- </recipe>
- <recipe xml:id="CheeseOnToast">
- <title>Cheese on Toast</title>
- <ingredient name="Bread"
- quantity="2"
- unit="slices"/>
- <ingredient name="Cheese"
- quantity="2"
- unit="slices"/>
- <time quantity="3"
- unit="minutes"/>
- <method>
- <step>1. Slice the bread and cheese.</step>
- <step>2. Grill one side of each slice of bread.</step>
- <step>3. Turn over the bread and place a slice of cheese on each piece.</step>
- <step>4. Grill until the cheese has started to melt.</step>
- <step>5. Serve and enjoy!</step>
- </method>
- </recipe>
- <recipe xml:id="HardBoiledEggs">
- <title>Hard-Boiled Eggs</title>
- <ingredient name="Eggs"
- quantity="3"
- unit="eggs"/>
- <time quantity="3"
- unit="minutes"/>
- <method/>
- </recipe>
-</cookbook>
-//! [100]
-
}
diff --git a/doc/src/xml-processing/xquery-introduction.qdoc b/doc/src/xml-processing/xquery-introduction.qdoc
index 93a33c1..25fa13f 100644
--- a/doc/src/xml-processing/xquery-introduction.qdoc
+++ b/doc/src/xml-processing/xquery-introduction.qdoc
@@ -40,11 +40,11 @@
****************************************************************************/
/*!
- \page xquery-introduction.html
- \title A Short Path to XQuery
+\page xquery-introduction.html
+\title A Short Path to XQuery
- \startpage Using XML Technologies
- \target XQuery-introduction
+\startpage Using XML Technologies
+\target XQuery-introduction
XQuery is a language for querying XML data or non-XML data that can be
modeled as XML. XQuery is specified by the \l{http://www.w3.org}{W3C}.
@@ -119,7 +119,7 @@ following XQuery:
\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 18
-The \c{doc()} function loads the file \l{cookbook.xml} and returns the
+The \c{doc()} function loads the \c{cookbook.xml} file and returns the
document node. The document node then becomes the focus for the next
step \c{//recipe}. Here the double slash means select all \c{<recipe>}
elements found below the document node, regardless of where they
@@ -535,7 +535,7 @@ methods is presented in the section on \l{Boolean Predicates}.
There are many more functions and operators defined for XQuery and
XPath. They are all \l{http://www.w3.org/TR/xpath-functions}
-{documented here}.
+{documented in the specification}.
\section2 Positional Predicates
@@ -688,12 +688,12 @@ XQueries wherever expressions are allowed.
\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 40
-If \c{cookbook.xml} is loaded without error, a \c{<resept>} element
-(Norweigian word for recipe) is constructed for each \c{<recipe>}
+If \c{cookbook.xml} is loaded without error, a \c{<oppskrift>} element
+(Norwegian word for recipe) is constructed for each \c{<recipe>}
element in the cookbook, and the child nodes of the \c{<recipe>} are
-copied into the \c{<resept>} element. But if the cookbook document
+copied into the \c{<oppskrift>} element. But if the cookbook document
doesn't exist or does not contain well-formed XML, a single
-\c{<resept>} element is constructed containing an error message.
+\c{<oppskrift>} element is constructed containing an error message.
\section1 Constructing Atomic Values
@@ -727,26 +727,23 @@ Sending this XQuery through xmlpatterns produces:
\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 40
-If \c{cookbook.xml} is loaded without error, a \c{<resept>} element
+If \c{cookbook.xml} is loaded without error, a \c{<oppskrift>} element
(Norweigian word for recipe) is constructed for each \c{<recipe>}
element in the cookbook, and the child nodes of the \c{<recipe>} are
-copied into the \c{<resept>} element. But if the cookbook document
+copied into the \c{<oppskrift>} element. But if the cookbook document
doesn't exist or does not contain well-formed XML, a single
-\c{<resept>} element is constructed containing an error message.
+\c{<oppskrift>} element is constructed containing an error message.
\section1 Running The Cookbook Examples
-Most of the XQuery examples in this document refer to the cookbook
-written in XML shown below. Save it as \c{cookbook.xml}. In the same
-directory, save one of the cookbook XQuery examples in a \c{.xq} file
-(e.g. \c{file.xq}). Run the XQuery using Qt's command line utility:
+Most of the XQuery examples in this document refer to the
+\c{cookbook.xml} example file from the \l{Recipes Example}.
+Copy the \c{cookbook.xml} to your current directory, save one of the
+cookbook XQuery examples in a \c{.xq} file (e.g., \c{file.xq}), and
+run the XQuery using Qt's command line utility:
\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 6
-\section2 cookbook.xml
-
-\snippet snippets/code/doc_src_qtxmlpatterns.qdoc 100
-
\section1 Further Reading
There is much more to the XQuery language than we have presented in
@@ -1019,5 +1016,4 @@ you want to use \c{true} and \c{false}. The other way is to invoke the
boolean constructor:
\quotefile snippets/patternist/xsBooleanTrue.xq
-
*/