From 470d214a5e363fc7035932fe46a5711b2b20c354 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 18 Sep 2009 16:36:02 +0200 Subject: Doc: Language and style fixes to the XML Patterns documentation. Reviewed-by: Trust Me --- doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc | 78 +----------------------- doc/src/xml-processing/xquery-introduction.qdoc | 40 ++++++------ 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/{./node()} - else Failed to load {$docURI} + then doc($docURI)//recipe/{./node()} + else Failed to load {$docURI} //! [40] //! [41] @@ -312,79 +312,5 @@ for $a in doc('doc.txt')//p

f0

//! [49] -//! [100] - - - - Quick and Easy Mushroom Soup - - - - - - - - - - - - Cheese on Toast - - - - - Hard-Boiled Eggs - - - -//! [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{} 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{} element -(Norweigian word for recipe) is constructed for each \c{} +If \c{cookbook.xml} is loaded without error, a \c{} element +(Norwegian word for recipe) is constructed for each \c{} element in the cookbook, and the child nodes of the \c{} are -copied into the \c{} element. But if the cookbook document +copied into the \c{} element. But if the cookbook document doesn't exist or does not contain well-formed XML, a single -\c{} element is constructed containing an error message. +\c{} 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{} element +If \c{cookbook.xml} is loaded without error, a \c{} element (Norweigian word for recipe) is constructed for each \c{} element in the cookbook, and the child nodes of the \c{} are -copied into the \c{} element. But if the cookbook document +copied into the \c{} element. But if the cookbook document doesn't exist or does not contain well-formed XML, a single -\c{} element is constructed containing an error message. +\c{} 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 - */ -- cgit v0.12