XQuery and XPath Full Text 1.0 Use CasesNOTE-xpath-full-text-10-use-casesW3C Working Group Note25January2011http://www.w3.org/TR/2011/NOTE-xpath-full-text-10-use-cases-20110125/XMLhttp://www.w3.org/TR/xpath-full-text-10-use-cases/Pat CaseLibrary of CongressSihem Amer-YahiaAT&T Labs - Research

This section describes the status of this
document at the time of its publication.
Other documents may supersede this document.
A list of current W3C publications and the latest
revision of this technical report can be found in the
W3C technical reports index
at http://www.w3.org/TR/.

This is a Working Group Note as described in the Process Document.
It has been jointly developed by the W3C
XML Query Working Group and the W3C XSL Working Group, each of which is part of the XML Activity.
The Working Groups expect to eventually publish this document as a Working Group Note.

This Use Cases document illustrates a number of use cases
that guided the development of the XQuery and XPath Full Text 1.0 specification.

This document incorporates changes made against the Last Call Working Draft of 18 May 2007.
Changes to this document since the Last Call Working Draft are detailed in
.

Please report errors in this document using W3C's
public Bugzilla system
(instructions can be found at
http://www.w3.org/XML/2005/04/qt-bugzilla).
If access to that system is not feasible, you may send your comments
to the W3C XSLT/XPath/XQuery public comments mailing list,
public-qt-comments@w3.org.
It will be very helpful if you include the string
“[FTUC]”
in the subject line of your report, whether made in Bugzilla or in email.
Please use multiple Bugzilla entries (or, if necessary, multiple email messages)
if you have more than one comment to make.
Archives of the comments and responses are available at
http://lists.w3.org/Archives/Public/public-qt-comments/.

Publication as a Working Group Note
does not imply endorsement by the W3C Membership.
At the time of publication, work on this document
was considered complete and no further revisions are anticipated.
It is a stable document and may be used as reference material or
cited from another document.
However, this document may be updated, replaced, or made obsolete by
other documents at any time.

This document was produced by groups operating under the
5 February 2004
W3C Patent Policy.
W3C maintains a public list of any
patent disclosures made in connection with the deliverables of the
XML Query Working Group and also maintains a public list of any patent
disclosures made in connection with the deliverables of the XSL
Working Group; those pages also include instructions for
disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes
contains
Essential Claim(s)
must disclose the information in accordance with
section 6 of the W3C Patent Policy.

This document specifies usage scenarios for full-text
queries as part of XQuery and XPath
.

English

Full Text Use Cases: PreliminariesProper Display of this Unicode Document

(1) Use a current operating system and browser.

(2) If necessary, set the character encoding in the browser manually to Unicode or UTF-8. Often this setting may be changed from the View menu.

(3) If after setting the character encoding to Unicode, the Chinese characters in the subject elements of the sample data still do not display, it is likely that the browser cannot locate a font that contains Chinese characters in Unicode encoding. It might be necessary to add a Unicode font, preferably Arial Unicode MS.

Introduction

The use cases listed below were created by the
XML Query Working Group and
the XSL Working Group to
illustrate important applications of full-text
querying within an XML query language. Each use case exercises a specific functionality relevant to full-text querying. An XML Schema and sample input data
are provided. Each use case specifies a query applied to the input data, a solution in XQuery, a solution in XPath (when possible), and the expected results.

The document supplements the XML Query Use Cases which can be found in the W3C
XML Query Use Cases . Use cases for character string querying are included in the XML Query Use Cases, not in this document.

These use cases:

(1) Present some possible functions and features for tokenized text support in XQuery and XPath.

(2) Illustrate simple and complex queries. The more complex queries would normally only be constructed by programmers, librarians, and other expert users.
Sometimes they may be provided for novice users via saved queries and graphical user interfaces. Each query illustrates a single functionality. Queries may overlap in their functionalities (e.g., phrases and ordered distance queries allowing no intervening words). Overlapping and similar functionalities are noted in
the comments on query behavior.

(3) Draw from sample data which are almost entirely in English. Use cases in other languages are solicited, especially where they
illustrate language-specific implementations of functions and features. Among the most sought after are use cases for queries
using prefix and infix wildcards, proximity queries, and operators and queries requiring functionality which may not have Western language equivalents.

(4) Include queries which in most instances can be written with pure Boolean full-text predicates or
with scoring (e.g., scoring on the number of occurrences of a word or phrase,
scoring on how close words are to one another within a distance
query, scoring on how similar a word is to the one being
stemmed) . A few, those in Section 17 (SCORE), cannot be written with Boolean full-text predicates. Scoring methodologies will not be defined in this recommendation. Scoring will be
implementation-defined. Results are provided in document order, except those in Section 17 (SCORE).
Results could be returned ordered differently, such as by relevance (based on
implementation-defined scoring) or explicitly by element.

(6) Include queries which are case insensitive. When
returning a paragraph, the text is returned as it occurs in the data model. This approach was chosen to keep the sample data short and the expected
results meaningful. It would have been equally valid to return only the words queried. A case-sensitive query is found in Section 9 (CHARACTER).

(7) Include queries which when they target XML elements are understood,
unless otherwise stated, to query text within any text node descendant of the element.

(8) Include queries which return only elements and attributes which meet all the conditions specified in the query. In particular, pure Boolean full-text predicate queries return results
where the Boolean conditions in the query are satisfied, i.e., are used to select what is being returned to users.

Query results may be returned in different ways. From a query for books containing the word "usability", users might be interested in returning, for each
book containing the word "usability", its number and its entire content. In another situation for the same query, users might be interested in
returning, for each book containing the word "usability", its number and only the elements and attributes in the content which contain the word "usability". As in this second situation, the queries in
these use cases return only elements and attributes which meet all the conditions specified in the query.

The Return clause may also include additional or different elements and attributes if specified, and may construct new elements.

(9) Include queries which provide some of the basic functionality of fuzzy match querying (e.g., wildcards, stemming, thesaurus support, proximity).

(10) Provide highlighting of found words and phrases in the expected results of queries as an aid to users.
The presence of highlighting says nothing about whether highlighting will be a feature of XQuery or XPath full-text querying.

(11) Display query solutions in XQuery and when possible in XPath. Queries that may not be written in XPath include those that contain element constructors and that cannot be written without let, where, and order by clauses.

Examples of full-text querying functionalities for XML query languages
can be found in , ,
, and .

To make the output more readable, the output of queries has been
formatted using whitespace which may not be returned by a query
processor. This whitespace should not be considered normative
for the correctness of results.

Presentation of Use Cases

The queries in these use cases are presented in the following format:

Query number Query title

User statement of query

Statement of functionality illustrated by query

Operands: Parts of words, words, phrases

Functionality: Operators, functions, collations, other functionality

Data context: One XPath expression locating the data being queried.

Query context: One or more XPath expressions locating the elements and attributes to be queried. The context of elements and attributes used in the Query context is relative to the Data context defined above.

Return: One or more XPath expressions which are returned only if the conditions specified in the query are met. Returned elements or attributes may differ from those specified in the Query context. Newly constructed elements might be returned. As in the Query context, the context of elements and attributes in Return statements is relative to the Data context defined above.

Comments: Comments on query behavior in general, and against the sample data in particular, plus the rationale for including
this query in the use cases.

Solution in XQuery:

Solutions illustrating XQuery Full Text syntax
appear here. All queries may be written in XQuery.
Solutions are written with pure Boolean full-text predicates
and not to invoke scoring, except for those in Section 17 (SCORE),
however all the queries in the document may be written as scored
queries with the addition of a score variable.
All queries are written assuming the default function namespace,
without the fn: prefix.

Solution in XPath:

Solutions illustrating XPath Full Text syntax appear
(when the query may be written in XPath) here.
Solutions are written with pure Boolean full-text predicates
and not to invoke scoring, except for those in Section 17 (SCORE),
however most of the queries in the document may be written as
scored queries with the addition of a score variable.
All queries are written assuming the default function namespace,
without the fn: prefix.

Expected Result:

Results are provided here.
Found words and phrases are highlighted.
For brevity, only the elements and attributes which meet
the conditions specified in the query are displayed. Others are
replaced with ...s.
Results are provided in document order, except those
in Section 17 (SCORE)Schema for Sample Data

The example queries in these use cases are based on a
collection with the following XML Schema:

The data consists of a collection of three books. Two are primarily instructive text. The third is a guide to a manuscript collection. All
contain metadata and full text.

The sample data binds to this URL: "http://bstore1.example.com/full-text.xml".

<books>
<book number="1">
<metadata>
<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews and
Usability Testing</title>
<author>Millicent Marigold</author>
<author>Montana Marigold</author>
<publicationInfo>
<place>New York</place>
<publisher>Ersatz Publications</publisher>
<dateIssued>2001</dateIssued>
<dateRevised>2002</dateRevised>
</publicationInfo>
<price>25.99</price>
<subjects xml:lang="en">
<subject>Usability testing</subject>
<subject>Web site development</subject>
<subject>Heuristic evaluation</subject>
<subject>Cognitive walk-through</subject>
<subject>Web site usability</subject>
</subjects>
<subjects xml:lang="fr">
<subject>Tests d'ergonomie</subject>
<subject>Développement de site web</subject>
<subject>Évaluation heuristique</subject>
<subject>Parcours cognitif</subject>
<subject>Ergonomie de site web</subject>
</subjects>
<subjects xml:lang="zh">
<subject>可用性测试</subject>
<subject>网站建置</subject>
<subject>启发式评价</subject>
<subject>认知推演</subject>
<subject>网站可用性</subject>
</subjects>
</metadata>
<content>
<introduction>
<author>Elina Rose</author>
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few errors.
Satisfaction with the site is also important.
The user must not only be well-served, but must
feel well-served.</p>
<p>Expert reviews and usability testing are
methods of identifying problems in layout,
terminology, and navigation before they frustrate
users and drive them away from your site.</p>
<p>The most successful projects employ multiple
methods in multiple iterations. As Millicent
Marigold remarked during a recent conference,
"Don't stop. Iterate, iterate, then iterate
again."</p>
<p>This book has been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
<title>Expert Reviews</title>
<introduction>
<p>Expert reviewers identify problems
and recommend changes to web sites based
on research in human computer interaction
and their experience in the field.</p>
<p>Two expert review methods are discussed
here. They are heuristic evaluation and
cognitive walk-through.</p>
<p>Expert review methods should be
initiated early in the development process,
as soon as paper <b>p</b>rototypes
(hand-drawn pictures of Web pages) or
<b>w</b>ireframes (electronic mockups) are
available. They should be conducted using
the hardware and software similar to that
employed by users.</p>
</introduction>
<chapter>
<title>Heuristic Evaluation</title>
<p>Expert reviewers critique an interface to
determine conformance with recognized
usability principles. <footnote>One of the
best known lists of heuristics is <citation
url="http://www.useit.com/papers/heuristic
/heuristic_list.html">Ten Usability
Heuristics by Jacob Nielson</citation>. Another
is <citation url="http://usability.gov
/guidelines/index.html"> Research-Based Web
Design and Usability Guidelines</citation>
</footnote></p>
</chapter>
<chapter>
<title>Cognitive Walk-Through</title>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usability
testing.</p>
<p>Users are asked to complete tasks which
measure the success of the information
architecture and navigational elements of the
site.</p>
<p>Then changes are made to improve service to
users.</p>
</chapter>
</part>
</content>
</book>
<book number="2">
<metadata>
<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<publicationInfo>
<place>New York</place>
<publisher>Ersatz Publications</publisher>
<publisher>Electronic BookWorks</publisher>
<dateIssued>2000</dateIssued>
<dateRevised>2001</dateRevised>
</publicationInfo>
<price>174.00</price>
<subjects xml:lang="en">
<subject>Usability testing</subject>
<subject>Web site development</subject>
<subject>Guides and finding aids</subject>
</subjects>
<subjects xml:lang="fr">
<subject>Tests d'ergonomie</subject>
<subject>Développement de site web</subject>
<subject>Guides et outils de recherche</subject>
</subjects>
<subjects xml:lang="zh">
<subject>可用性测试</subject>
<subject>网站建置</subject>
<subject>指南和检索工具</subject>
</subjects>
</metadata>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
<p>This book has not been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
<chapter>
<title>Planning then Conducting Usability
Tests</title>
<p>Take the following steps to plan usability
testing. <step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
<p>Users can be tested at any computer
workstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>
<book number="3">
<metadata>
<title shortTitle="Usabilityguy Manuscript
Guide">John Wesley Usabilityguy: A Register of His
Papers</title>
<author>Millicent Marigold</author>
<author>Morty Marigold</author>
<publicationInfo>
<place>Washington, D.C.</place>
<publisher>Ersatz Manuscript Library</publisher>
<dateIssued>1998</dateIssued>
<dateRevised>2002</dateRevised>
</publicationInfo>
<price>21.49</price>
<subjects xml:lang="en">
<subject>Computers</subject>
<subject>Software evaluation</subject>
<subject>Usability testing</subject>
<subject>Manuscript collections</subject>
</subjects>
<subjects xml:lang="fr">
<subject>Ordinateurs</subject>
<subject>Évaluation de logiciels</subject>
<subject>Tests d'ergonomie</subject>
<subject>Collections de manuscrits</subject>
</subjects>
<subjects xml:lang="zh">
<subject>计算机</subject>
<subject>软件评价</subject>
<subject>可用性测试</subject>
<subject>手稿专藏</subject>
</subjects>
</metadata>
<content>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-2001, with the bulk of the items
concentrated in the period from 1985 to 2001. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
<part number="1"><container type="box">1-12</container>
<title>Subject File, <date normalize="1930/1974">
1930-1974</date></title>
<introduction>
<p>Correspondence, telegrams, memoranda, journals,
logs, testimony, approved travel orders, invitations,
charts, graphs, forms, biographical data, photographs,
book drafts, clippings and other printed matter,
résumés and miscellaneous material. Organized by
name of person or organization, topic, or type of
material.</p>
</introduction>
<component><container type="box">1</container>
<componentTitle>Computers</componentTitle>
<subComponent>
<componentTitle>Software,
<componentDate normalize="1946/1947">1946-1947
</componentDate>
</componentTitle>
</subComponent>
<subComponent>
<componentTitle>Human Computer Interaction
research, <componentDate normalize="1945/1952">
1945-1952</componentDate>
</componentTitle>
<subsubComponent>
<componentTitle>Flow diagram,
<componentDate normalize="1950">1950
</componentDate>
</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>General,
<componentDate normalize="1947/1951">1947-1951
</componentDate>
</componentTitle>
</subsubComponent>
<subsubComponent><container type="box">2</container>
<componentTitle>Eye Movement research,
<componentDate normalize="1949/1950">1949-1950
</componentDate>
</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>User profiling,
<componentDate normalize="1950/1959">1950s
</componentDate>
</componentTitle>
</subsubComponent>
</subComponent>
</component>
<component>
<componentTitle>Web User Appreciation Award,
<componentDate normalize="1956">1956</componentDate>
</componentTitle>
</component>
</part>
<part number="2"><container type="box">3-5</container>
<title>Writings File,
<date normalize="1985/1999">1985-1999</date>
</title>
<introduction>
<p>Correspondence, articles, book drafts, notes,
contracts, clippings, and printed matter. Arranged
alphabetically by type (articles, books, reports,
and miscellaneous) and therein alphabetically by
type of material, subject, or title.</p>
</introduction>
<component>
<componentTitle>Writings by Usabilityguy
</componentTitle>
<subComponent>
<componentTitle><componentDate normalize="1996">
1996</componentDate>
</componentTitle>
<subsubComponent>
<componentTitle>"How Many Users Are Enough
for User Testing?"</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>"How to Evaluate Results from
User Tests."</componentTitle>
</subsubComponent>
<subsubComponent>
<container type="box">5</container>
<componentTitle>"When Are You Done Testing?"
</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>"Do-It-Yourself User Testing"
</componentTitle>
</subsubComponent>
</subComponent>
</component>
<component>
<componentTitle>Charitable Contributions
</componentTitle>
<subComponent>
<componentTitle>Diseases: AIDS, Hepatitis,
Tuberculosis <componentDate normalize=
"1990/1999">1990-1999</componentDate>
</componentTitle>
</subComponent>
<subComponent>
<componentTitle>Environmental Conservation:
Rivers <componentDate normalize="1995">1995
</componentDate>
</componentTitle>
</subComponent>
</component>
</part>
</content>
</book>
</books>Use Case "ELEMENT": Queries on XML Elements with Simple ContentDescription

These use cases query words and phrases in XML elements with simple content.

These use cases begin with the simplest queries possible. They query a word or phrase in an element with simple content and no descendants. One of these queries is on Chinese characters. Some queries return additional or different elements than were queried. A query queries and returns the full document. Others find a phrase only when it starts an element and find a exact phrase when it is the entire content of an element, allowing full-text variations, such as case, diacritics, and wildcards.

Comments: This is the simplest query possible, a query on a word in an element. This
query does not employ wildcards, stemming, or thesaurus support. While this query finds useful results in the sample
data, many queries such as one on the word "test" would not. A query on the word "test" would return no results, missing the word
variants which exist in the sample data: "pretest", "tested", "testers", "testimony", "testing", and "tests".

<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews
and Usability Testing</title>
<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>Q2 Phrase Query in an Element

Comments: This is a simple query on a phrase in an element. Like an ordered distance query allowing no intervening words, the words in this phrase query must be adjacent to each other and must appear in the order specified. While this query finds useful results in the sample data, many queries such as one on "software developer" would not. A query on the phrase "software developer" would return no results, missing "developer of software" which exists
in the sample data.

Comments: The starts-with functionality restricts the query to the first words or phrase in an element. It is especially useful in querying journal
titles (e.g., Journal of Psychology) in large library collections. This query does not find Book 2 which contains the phrase
"improving the usability" in the title element, because the title element does not start with "improving".

Comments: This query insists that the element contains the entire phrase being queried, no more and no less. It allows full-text variations, such as case, diacritics, and wildcards.

Solution in XQuery:

for $book in doc("http://bstore1.example.com/full-text.xml")
/books/book
let $exactTitle := $book/metadata/title
where $exactTitle contains text "improv.* the usability of a
web site through expert reviews and usability testing"
using wildcards entire content
return $exactTitle

Solution in XPath:

doc("http://bstore1.example.com/full-text.xml")
/books/book/metadata/title[. contains text
"improv.* the usability of a web site through expert
reviews and usability testing" using wildcards entire
content]

Expected Result:

<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews and
Usability Testing</title>Use Case "ACROSS": Queries Across XML Element BoundariesDescription

These use cases by default query across XML element boundaries.

Boundaries include XML tags: Start-Tags, End-Tags, and Empty-Element Tags. Descendant XML tags and attribute values are removed from the string to be queried by tokenization before the query. At the XQuery Data Model level tags are a syntactic element.

Find queries in an element which do not query some or all of its descendant elements in Section 14 (IGNORE).

Comments: Querying across element boundaries is similar to an XQuery and XPath character string function converting the sub-tree
under an element into a string by removing all markup. The citation element tags, including element names, attribute names, and attribute values, have been removed by tokenization.

Solution in XQuery:

for $book in doc("http://bstore1.example.com/full-text.xml")
/books/book
let $chap := $book//chapter
where $chap contains text "one of the best known lists of
heuristics is Ten Usability Heuristics"
return $book

Solution in XPath:

doc("http://bstore1.example.com/full-text.xml")
/books/book[.//chapter contains text "one of
the best known lists of heuristics is Ten Usability
Heuristics"]

Comments: Querying across element boundaries is similar to an XQuery and XPath character string function converting the sub-tree
under an element into a string by removing all markup. The bold element tags have been removed by tokenization.

<book number="1">
<metadata>
...
</metadata>
<content>
...
<part number="1">
<introduction>
<p>Expert review methods should be
initiated early in the development process,
as soon as paper <b>p</b>rototypes
(hand-drawn pictures of Web pages) or
<b>w</b>ireframes (electronic mockups) are
available. They should be conducted using
the hardware and software similar to that
employed by users.</p>
</introduction>
...
</part>
...
</content>
</book>Q3 Query Across Descendant Elements (Substantive Tags)

Comments: Querying across element boundaries is similar to an XQuery and XPath character string function converting the sub-tree
under an element into a string by removing all markup. Element tags, including element names, attribute names, and attribute values, have been removed by tokenization, including part,
chapter, title, p, component, subComponent, subsubComponent, and componentTitle tags.

Comments: Querying across element boundaries is similar to an XQuery and XPath character string function converting the sub-tree
under an element into a string by removing all markup. Element tags, including element names, attribute names, and attribute values, have been removed by tokenization, including title and p tags.

<book number="1">
<metadata>
...
</metadata>
<content>
...
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usability
testing.</p>
...
</chapter>
</part>
</content>
</book>Q5 Query in Different Sub-Trees

Find all books with word "identify" in book introductions or part introductions.

This query finds a word in a document (anywhere in the document), crossing all element boundaries.

Operands: "mouse"

Functionality: word query

Data context: doc("http://bstore1.example.com/full-text.xml")/books

Query context: .

Return: .

Comments: This query queries the root element and all its descendants. Querying across element boundaries is similar to an XQuery and XPath character string function converting the sub-tree under an element into a string by removing all markup. Element tags, including element names, attribute names, and attribute values, have been removed by tokenization. This query looks for a word inside an entire document and returns the entire document if the word exists. It does not employ wildcards, stemming, or thesaurus support. It is similar to search engine queries that search a collection of documents and return a subset of the searched collection.

<book number="1">
<metadata>
...
</metadata>
<content>
...
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
...
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
...
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
...
</part>
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
...
</content>
</book>Use Case "OTHER": Queries on Attribute ValuesDescription

Unlike all the other use cases in this document which query element content implicitly, these use cases query XML attribute values. Attribute values are not queried implicitly; they are queried explicitly.

Queries and ResultsQ1 Query on Attribute

Find all books with "improve" "web" "usability" in the short title.

This query finds multiple words in an attribute allowing word variants and allowing the words in any order with up to a specified number of intervening words.

These use cases illustrate queries which use wildcards to append or insert a character or sequence of characters to a word or a part of a word. Character wildcards may be prefix (appended before the first character), infix (inserted into a word), or suffix (appended after the last character).

Queries and ResultsQ1 One Character Suffix Wildcard Query

Find all books with the word "test" with a one character suffix in the text.

This query finds a word with a one character suffix (one character after the last character).

Comments: This query finds "tests", but not "pretest, "tested", "testers", "testimony",
and "testing" which also appear in the sample data. There is no "test" in the sample data, but if there was, this query would not have found it.

Comments: This is a suffix query on a part of a word "us" which is not one of the words or one of the roots of the words desired in the results. The query on
"us" will find "usability" and "user". Where stemmed queries (Section 6 (STEMMING)) attempt to find linguistic variants of a word or the root of a word, wildcards may be applied to any part of a word and will find all character combinations found.

1, Improving the Usability of a Web Site Through
Expert Reviews and Usability Testing
2, Usability Basics: How to Plan for and Conduct
Usability Tests on Web Site Thereby Improving the
Usability of Your Web Site
3, John Wesley Usabilityguy: A Register of His
PapersQ5 Specified Range of Characters Suffix Wildcard Query

Find all books with the word "test" with a three to four character suffix in the text.

This query finds a word with a number of characters within a specified range in a suffix (specified range of characters after the last character).

Comments: This query allows any three or four character suffix. It finds "testers" and "testing", but not "pretest" "tests" and "tested"
which also appear in the sample data. There is no "test" in the sample data, but if there was, this query would not have found it.

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
...
<p>Expert reviews and usability testing are
methods of identifying problems in layout,
terminology, and navigation before they frustrate
users and drive them away from your site.</p>
...
</introduction>
...
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usability
testing.</p>
...
</chapter>
</part>
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
...
</introduction>
<part number="1">
<chapter>
<p>Take the following steps to plan usability
testing. <step number="1">Clarify and
articulate the goal of the >usability testing.
<step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
...
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
...
<part number="2"><container type="box">3-5</container>
<title>Writings File,
<date normalize="1985/1999">1985-1999</date>
</title>
...
<component>
<componentTitle>Writings by Usabilityguy
</componentTitle>
<subComponent>
<componentTitle><componentDate normalize="1996">
1996</componentDate>
</componentTitle>
<subsubComponent>
<componentTitle>"How Many Users Are Enough
for User Testing?"</componentTitle>
</subsubComponent>
...
<subsubComponent>
<componentTitle>"When Are You Done Testing?"
</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>"Do-It-Yourself User Testing"
</componentTitle>
</subsubComponent>
</subComponent>
</component>
...
</part>
</content>
</book>
Use Case "STEMMING": Word Stemming QueriesDescription

These use cases invoke a stemming algorithm (e.g., Porter) which finds noun, verb, adjective, and adverb
forms of a word or root of a word in singular and plural.

Queries and ResultsQ1 Query Stemming on Word Root

Find all books with the word "test" in the text.

This query finds a word and its variants applying a stemming algorithm.

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
...
<p>Expert reviews and usability testing are
methods of identifying problems in layout,
terminology, and navigation before they frustrate
users and drive them away from your site.</p>
...
</introduction>
...
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usability
testing.</p>
...
</chapter>
</part>
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
...
</introduction>
<part number="1">
<chapter>
<title>Planning then Conducting Usability
Tests</title>
<p>Take the following steps to plan usability
testing. <step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
<p>Users can be tested at any computer
workstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
...
<part number="2"><container type="box">3-5</container>
<title>Writings File,
<date normalize="1985/1999">1985-1999</date>
</title>
...
<component>
<componentTitle>Writings by Usabilityguy
</componentTitle>
<subComponent>
<componentTitle><componentDate normalize="1996">
1996</componentDate>
</componentTitle>
<subsubComponent>
<componentTitle>"How Many Users Are Enough
for User Testing?"</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>"How to Evaluate Results from
User Tests."</componentTitle>
</subsubComponent>
<subsubComponent>
<container type="box">5</container>
<componentTitle>"When Are You Done Testing?
</componentTitle>
</subsubComponent>
<subsubComponent>
<componentTitle>"Do-It-Yourself User Testing"
</componentTitle>
</subsubComponent>
</subComponent>
</component>
...
</part>
</content>
</book>Q2 Query Stemming on Multiple Word Roots

Find all books with the phrases "usability testing" or "users testing" in the text.

This query finds phrases applying a stemming algorithm to selected words within the phrases.

Comments: This query applies stemming to one word in a phrase. Unlike the wildcard queries in Section 5 (WILDCARD) which allow any suffix, a stemmed query on "us" will not
find "user" and "usability", because they do not share the same root. This query uses an ftor query introduced in Section 10 (LOGICAL).

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
...
<p>Expert reviews and usability testing are
methods of identifying problems in layout,
terminology, and navigation before they frustrate
users and drive them away from your site.</p>
...
</introduction>
...
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usabilitytesting.</p>
...
</chapter>
</part>
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usabilitytesting should be used in conjunction with other
expert review methods.</p>
...
</introduction>
<part number="1">
<chapter>
<p>Take the following steps to plan usabilitytesting. <step number="1">Clarify and
articulate the goal of the usability testing.
<step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
...
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usabilitytesting can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
...
</part>
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
...
<part number="2"><container type="box">3-5</container>
<title>Writings File,
<date normalize="1985/1999">1985-1999</date>
</title>
...
<component>
<componentTitle>Writings by Usabilityguy
</componentTitle>
<subComponent>
<componentTitle><componentDate normalize="1996">
1996</componentDate>
</componentTitle>
<subsubComponent>
<componentTitle>"How Many Users Are Enough
for User Testing?"</componentTitle>
</subsubComponent>
...
<subsubComponent>
<subsubComponent><componentTitle>"Do-It-
Yourself User Testing"
</componentTitle>
</subsubComponent>
</subComponent>
</component>
...
</part>
</content>
</book>Use Case "THESAURUS": Queries Which Use Thesauri, Dictionaries, and TaxonomiesDescription

These use cases illustrate queries which return synonyms or related words identified by thesauri, dictionaries, and taxonomies.

Queries and ResultsQ1 Query on Synonyms Identified by a Thesaurus

Find all introductions which quote someone.

This query finds words and phrases using a thesaurus to return synonyms.

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
...
<p>Expert reviews and usability testing are
methods of identifying problems in layout,
terminology, and navigation before they frustrate
users and drive them away from your site.</p>
...
</introduction>
...
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
...
<part number="2">
...
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>Q3 Query on Broader Terms Identified by a Thesaurus

Are there any "letters" or "holiday cards" in John Wesley Usabilityguy's papers?

This query finds words and phrases using a thesaurus to identify broader terms.

Comments: This query uses sounds-like support to identify words which sound
like the word
"Merrygould". It
finds the word
"Marigold". Examples of
how this query is
implemented include
keeping a list of
similar words (akin to
a thesaurus) or using
a system based on
phonetic similarity.

Comments: This query uses support for similarly spelled words to identify words close in
spelling to "sucessfull". It finds the word "successful". Examples of
how this query is
implemented include
keeping a list of
similar words (akin to
a thesaurus) or using
a system based on spelling
similarities.

<book number="1">
<metadata>
...
</metadata>
<content>
...
<introduction>
...
<p>The most successful projects employ multiple
methods in multiple iterations. As Millicent
Marigold remarked during a recent conference,
"Don't stop. Iterate, iterate, then iterate
again."</p>
...
</introduction>
<part number="1">
<title>Expert Reviews</title>
...
<chapter>
<title>Cognitive Walk-Through</title>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
...
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
...
<part number="2">
...
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>Q6 Query on Subordinate Terms Identified by a Taxonomy

Find out whether John Wesley Usabilityguy included research on "AIDS" and "other infectious diseases" among the charities he supported.

This query finds words using a taxonomy to identify subordinate terms.

doc("http://bstore1.example.com/full-text.xml")
/books/book[@number="3" and .//component contains text
"AIDS" using uppercase using thesaurus at
"http://bstore1.example.com/OurTaxonomy.xml"
relationship "disease in this category"]

These use cases query a phrase, one word of which has been identified as a stop word via a stop word list. The first treats the stop word as a stop word. The second does not, making it available again for querying. Another query calls a stop word list then excludes a word on the list making that word available for querying.

Words identified as stop words may be routinely eliminated from queries, allowing any word to be substituted.

Queries and ResultsQ1 Query on Stop Word Treated as a Stop Word

Find all books with the phrase "planning then conducting" in the text where "then" is treated as a stop word.

This query finds a phrase substituting any word for a word which has been identified as a stop word via a stop word list.

Comments: Once the stop word "then" has been identified via the stop word list at http://bstore1.example.com/StopWordList.xml, this query is reduced to a query on the phrase "planning" any word "conducting", allowing any word as a substitute for the stop word. It finds both "planning and conducting" and "planning then conducting" in the sample data.

Comments: The stop words "not" and "been" are identified via a stop word list, however the stop word "not" is removed temporarily from the stop word list and used as an operand in the query. The query becomes a query on the phrase "not" [any word] "approved", allowing any word as a substitute for the stop word "been". It does not return books with the word "approved" in the phrases "been approved" and "approved travel orders" in the sample data.

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct
Usability Tests on Web Site Thereby Improving the
Usability of Your Web Site</title>
<content>
...
<p>This book has not been approved by the Web Site
Users Association</p>
...
</content>Use Case "CHARACTER": Queries Specifying Normalized Forms of Characters and Tokenized WordsDescription

These use cases illustrate queries on words entered with
diacritics sometimes finding the same; other times finding words with and without diacritics. They query words
entered in upper case sometimes finding the same; other times finding words in both upper and lower case.

Queries and ResultsQ1 Diacritics Sensitive Query

Verify the existence of a "résumé" in the papers of John Wesley Usabilityguy.

This query finds a word only if it contains the diacritics as written in the query.

Operands: "résumé"

Functionality: word query, functionality requiring presence of diacritics as written in the query, character wildcard (suffix) (1)

Comments: The desired results include only the words "résumé" and "résumés" with diacritics as written in the query, not the
more often used words "resume" (which is present in the sample data) and "resumes".

Comments: The desired results include either the words "résumé" or "résumés" with diacritics or the words "resume" or "resumes" without diacritics. Whether diacritics are written in the query or not is not considered.

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
...
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few errors.
Satisfaction with the site is also important.
The user must not only be well-served, but must
feel well-served.</p>
...
<p>This book has been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
<title>Expert Reviews</title>
<introduction>
<p>Expert reviewers identify problems
and recommend changes to web sites based
on research in human computer interaction
and their experience in the field.</p>
...
<p>Expert review methods should be
initiated early in the development process,
as soon as paper <b>p</b>rototypes
(hand-drawn pictures of Web pages) or
<b>w</b>ireframes (electronic mockups) are
available. They should be conducted using
the hardware and software similar to that
employed by users.</p>
</introduction>
<chapter>
<title>Heuristic Evaluation</title>
<p>Expert reviewers critique an interface to
determine conformance with recognized
usability principles. <footnote>One of the
best known lists of heuristics is <citation
url="http://www.useit.com/papers/heuristic
/heuristic_list.html">Ten Usability
Heuristics by Jacob Nielson</citation>. Another
is <citation url="http://usability.gov
/guidelines/index.html"> Research-Based Web
Design and Usability Guidelines</citation>
</footnote></p>
</chapter>
<chapter>
<title>Cognitive Walk-Through</title>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
...
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
<p>This book has not been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
...
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
...
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-2001, with the bulk of the items
concentrated in the period from 1985 to 2001. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
<part number="1"><container type="box">1-12</container>
<title>Subject File, <date normalize="1930/1974">
1930-1974</date></title>
...
<component><container type="box">1</container>
<componentTitle>Computers</componentTitle>
<subComponent>
<componentTitle>Software,
<componentDate normalize="1946/1947">1946-1947
</componentDate>
</componentTitle>
</subComponent>
...
</component>
<component>
<componentTitle>Web User Appreciation Award,
<componentDate normalize="1956">1956</componentDate>
</componentTitle>
</component>
...
</part>
</content>
</book>Q2 And Query

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
<author>Elina Rose</author>
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few errors.
Satisfaction with the site is also important.
The user must not only be well-served, but must
feel well-served.</p>
...
<p>This book has been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
<title>Expert Reviews</title>
<introduction>
<p>Expert reviewers identify problems
and recommend changes to web sites based
on research in human computer interaction
and their experience in the field.</p>
...
<p>Expert review methods should be
initiated early in the development process,
as soon as paper <b>p</b>rototypes
(hand-drawn pictures of Web pages) or
<b>w</b>ireframes (electronic mockups) are
available. They should be conducted using
the hardware and software similar to that
employed by users.</p>
</introduction>
<chapter>
<title>Heuristic Evaluation</title>
<p>Expert reviewers critique an interface to
determine conformance with recognized
usability principles. <footnote>One of the
best known lists of heuristics is <citation
url="http://www.useit.com/papers/heuristic
/heuristic_list.html">Ten Usability
Heuristics by Jacob Nielson</citation>. Another
is <citation url="http://usability.gov
/guidelines/index.html"> Research-Based Web
Design and Usability Guidelines</citation>
</footnote></p>
</chapter>
<chapter>
<title>Cognitive Walk-Through</title>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
...
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-2001, with the bulk of the items
concentrated in the period from 1985 to 2001. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
<part number="1"><container type="box">1-12</container>
<title>Subject File, <date normalize="1930/1974">
1930-1974</date></title>
...
<component><container type="box">1</container>
<componentTitle>Computers</componentTitle>
<subComponent>
<componentTitle>Software,
<componentDate normalize="1946/1947">1946-1947
</componentDate>
</componentTitle>
</subComponent>
...
</component>
<component>
<componentTitle>Web User Appreciation Award,
<componentDate normalize="1956">1956</componentDate>
</componentTitle>
</component>
...
</part>
</content>
</book>Q3 And Query Ordered

Find all book text containing the words "goal" "obstacles" "task" in this order.

Comments: This query finds multiple words in a specified
order. It is more permissive than a phrase query. It is comparable to an
ordered distance query where the number of intervening words is zero or more.

<book number="1">
<metadata>
...
</metadata>
<content>
...
<part number="1">
<chapter>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
...
</content>
</book>
Q4 Unary Not Query

Find all books which do not belong in a collection on "usability testing".

This query finds books which do not contain a phrase in an element and its descendants.

Comments: Unlike the and not query below, the unary not query
requires only one operand. This query has value for information architects and data managers
who will use it for checks such as this one: to find nonconforming data in a document or a
collection.

Comments: The and not query is also called a but, but not, without
query. Unlike the unary not query above,this query requires two operands. Book 2
which contains the words "usability" and "plan" in the metadata is not returned.

Comments: This query will return a result
the user wants even though it contains the phrase the user
deprecated via the mild not, "book drafts". The user will not lose results which
contain what he wants when that book also contains what he does not want. Books containing
instances of "book drafts" (a subset of "drafts") are not automatically excluded. Instead the "book drafts" instances are not considered when determing whether or not to include books in the result set.

<book number="3">
<metadata>
...
</metadata>
<content>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-2001, with the bulk of the items
concentrated in the period from 1985 to 2001. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
...
</content>
</book>Use Case "CARDINALITY": Queries in Same, Any, Every Instance of an Element, and Occurrence Count QueryDescription

These use cases illustrate instance queries and occurrence count queries. They query words within the same, any, and every instance of an element. Another query finds a phrase only if it occurs over a specified number of times in a book.

Queries and ResultsQ1 Query in Same Instance of an Element

Find all books with the phrase "web site" and the word "usability" in the same subject.

This query finds a word and a phrase in the same instance of an element.

Comments: This query finds a word and a phrase in an instance of an element, not allowing one
of the operands to be found in an instance of the element and the other operand in a different instance of
the element. This query does not find Book 2 which has "usability" and "web site" in different instances of the subject element.

Comments: This query finds words and phrases in any instance of an
element, allowing one of the operands to be found in one sibling and the other operand
in a different sibling of the same element name.

Comments: This query does not return a book if at least one of its publishers does not contain the words "ersatz" and
"publications". Book 1 is returned because it has an instance of the publisher element which satisfies the full-text conditions (contains both "Ersatz" and
"Publications"). Book 2 is not returned because even though it has a publisher that satisfies the full-text conditions, it also has a publisher that
does not satisfy it. Book 3 is not returned because it has an instance of the publisher element which
does not satisfy the query (contains "Ersatz" but not "Publications").

<book number="1">
<metadata>
...
</metadata>
<content>
...
<part number="1">
<title>Expert Reviews</title>
<introduction>
...
<p>Two expert review methods are discussed
here. They are heuristic evaluation and
cognitive walk-through.</p>
<p>Expert review methods should be
initiated early in the development process,
as soon as paper <b>p</b>rototypes
(hand-drawn pictures of Web pages) or
<b>w</b>ireframes (electronic mockups) are
available. They should be conducted using
the hardware and software similar to that
employed by users.</p>
</introduction>
...
</part>
</content>
</book>Use Case "PROXIMITY": Queries on Proximity Relationships Including Distance, Window, Sentence, and ParagraphDescription

These use cases illustrate unordered and ordered distance queries which find
sequences of words allowing up to a specified number of intervening words. They also include a query
to find words within a window, within a sentence, and within a
paragraph.

Queries and ResultsQ1 Unordered Distance Query

Find all books with information on "software developers".

This query finds multiple words in any order allowing up to a specified number of intervening words.

<book number="3">
<metadata>
...
</metadata>
<content>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-2001, with the bulk of the items
concentrated in the period from 1985 to 2001. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
...
</content>
</book>Q2 Ordered Distance Query

Find all books with information on "efficient task completion".

This query finds multiple words in the order queried allowing up to a specified number
of intervening words.

<book number="1">
<metadata>
...
</metadata>
<content>
<content>
<introduction>
...
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective taskcompletion, while propagating few errors.
Satisfaction with the site is also important.
The user must not only be well-served, but must
feel well-served.</p>
...
</introduction>
...
</content>
</book>Q3 Ordered Window Query

Find all books about "users feeling well-served".

This query finds books with multiple words within an ordered window of up to a specified number of words.

Comments: This query opens a window on the first found word (which because of the ordered operator must be the first word queried) and counts a specified number
of words from that first word within which it may find the remaining word or words, finding them
in the order queried.

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
...
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few errors.
Satisfaction with the site is also important.
The user must not only be well-served, but must
feelwell-served.</p>
...
</introduction>
...
</content>
</book>Q4 Unordered Within a Sentence Query

Find all books which discuss "questions asked during cognitive walk-throughs".

This query finds books with multiple words in any order within a sentence.

<book number="1">
<metadata>
...
</metadata>
<content>
...
<part number="1">
<chapter>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
userknow by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
...
</content>
</book>Q5 Unordered Within a Paragraph Query

Find all paragraphs which define what "Web site usability" is.

This query finds books with multiple words and phrases in any order within a paragraph.

Comments: This query expects an implementation-defined tokenized paragraph or a paragraph element. Depending on the implementation, this query might return no result instead of the Expected Result presented.

<book number="1">
<metadata>
...
</metadata>
<content>
<content>
<introduction>
...
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few errors.
Satisfaction with the site is also important..
The user must not only be well-served, but must
feel well-served.</p>
...
</introduction>
...
</content>
</book>Use Case "AXES": Queries Using Relative XPath AxesDescription

These use cases illustrate queries traversing relative XPath axes.

Queries and ResultsQ1 Query on Element and Its Children

Find all books with paragraphs containing the phrase "computer workstation" and footnotes
within those paragraphs containing the word "comfortable".

This query finds a phrase in an element, then finds a word in a child element.

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
<p>This book has not been approved by the Web Site
Users Association.</p>
<p>Take the following steps to plan usability
testing. <step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
<p>Users can be tested at any computer workstation
<footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>Q2 Query on Element Returning Its First Two Children

Find the first two steps in chapters on "conducting usability tests."

This query finds words in an element, then returns its first two children elements.

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<step number="1">Clarify and articulate
the goal of the usability testing.</step>
<step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step>Q3 Query on Element and Its Ancestors

Are there any "flow diagrams" of "human computer interaction" scenarios in John Wesley
Usabilityguy's papers?

This query finds a phrase in an element, then finds another phrase in an ancestor element.

<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews and
Usability Testing</title>
<chapter>
<title>Heuristic Evaluation</title>
<p>Expert reviewers critique an interface to
determine conformance with recognized
usability principles. <footnote>One of the
best known lists of heuristics is <citation
url="http://www.useit.com/papers/heuristic
/heuristic_list.html">Ten Usability
Heuristics by Jacob Nielson</citation>. Another
is <citation url="http://usability.gov
/guidelines/index.html"> Research-Based Web
Design and Usability Guidelines</citation>
</footnote></p>
</chapter>
<chapter>
<title>Cognitive Walk-Through</title>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
<chapter>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usabilitytesting.</p>
<p>Users are asked to complete tasks which
measure the success of the informationarchitecture and navigational elements of the
site.</p>
<p>Then changes are made to improve service to
users.</p>
</chapter>
Use Case "IGNORE": Queries Ignoring Descendant Element ContentDescription

These phrase and proximity queries cross element boundaries ignoring the
content of descendant elements. One query ignores the content of a
complete sub-tree. Other queries ignore only the content of specified
descendant elements. The last query performs a level-by-level ignore. It ignores the content of descendant elements when querying the content of the parent element. Its descendant elements are promoted and then their content is queried.

Comments: This query ignores the content of all the descendant elements of the p element, so it ignores the footnote and testingProcedure elements. If the descendant elements were not ignored, the words searched would be too distant from each other to have been returned.

<book number="2">
<metadata>
...
</metadata>
<content>
...
<part number="2">
<chapter>
...
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
...
</part>
</content>
</book>Q2 Phrase Query Ignoring Content of Descendant Element Specified by XPath Expression

Find all book chapters containing "users can be tested at any computer
workstation or in a lab" ignoring footnotes.

This query finds book chapters containing the phrase "users can be
tested at any computer workstation or in a lab" ignoring the content of a descendant element explicitly specified by an XPath expression.

Operands: "users can be tested at any computer workstation or in a lab"

Comments: This query ignores the content of a descendant element, the footnote element.

Solution in XQuery:

for $book in doc("http://bstore1.example.com/full-text.xml")
/books/book
let $chap := $book//chapter[. contains text "users
can be tested at any computer workstation
or in a lab" without content .//footnote]
where $chap
return ($book/metadata/title, $chap)

Solution in XPath:

doc("http://bstore1.example.com/full-text.xml")
/books/book//chapter[. contains text
"users can be tested at any computer workstation or in a lab"
without content .//footnote
]/(ancestor::book/metadata/title, .)/.

Expected Result:

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<chapter>
...
<p>Users can be tested at any computerworkstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote>or in a lab.</p>
...
</chapter>Q3 Phrase Query Ignoring Content of Descendant Element Specified by Full-Text Query

Find all book chapters containing the phrase "at any computer workstation or in a lab" ignoring footnotes on workstations.

This query ignores the content of a descendant element specified by a full-text query.

Operands: "at any computer workstation or in a lab", "workstations"

Functionality: phrase query, character wildcard (suffix) (1), ignore content of a descendant element found by a full-text query

Comments: This query ignores the content of a descendant element identified dynamically by a full-text query.

Solution in XQuery:

for $chapter in doc("http://bstore1.example.com/full-text.xml")
/books/book//chapter
where $chapter contains text "at any computer
workstation or in a lab" without content
$chapter//footnote[. contains text "workstation.*"
using wildcards]
return ($chapter/ancestor::book/metadata/title, $chapter)

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your Web
Site</title>
<chapter>
...
<p>Users can be tested at any computerworkstation<footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote>or in a lab.</p>
...
</chapter>Q4 Distance Query Ignoring Content of Descendant Elements Level by Level

Find all books with the word "workstation" near the word "lab".

This query performs a level-by-level ignore. It ignores the content of descendant elements when querying the content of the parent element. Its descendant elements are promoted and then their content is queried. It differs from the ignore queries above because it queries the content of parent elements skipping over the descendant elements, then instead of stopping there it queries the content of descendent elements in isolation.

Operands: "workstation" "lab"

Functionality: word queries, unordered distance (0 to 6 intervening words), level by level ignore (ignore the content of descendant element when searching the parent element and promote the descendant element and query it in isolation)

Comments: This query ignores the content of the descendant element footnote when querying its parent element p returning "workstation" and "lab" from "Users can be tested at any computer workstation or in a lab". Then the descendant element footnote is promoted and queried separately returning "workstation" and "lab" from "They may be more comfortable at their own workstation than in a lab". This query is written using the standard ignore syntax ORing together parent and descendant elements to be queried separately.

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<p>Users can be tested at any computer
workstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<footnote>They may be more comfortable at their own
workstation than in a lab.</footnote>
Use Case "FULL-TEXT-COMPOSABILITY": Queries Illustrating Composability of Full-Text with ItselfDescription

The use cases illustrate a multi-lingual query and queries which use multiple full-text functionalities in conjunction with other XQuery and XPath functionalities.

Queries and ResultsQ1 Query on Words and Phrases in Two Languages

Find all books with the subject "网站可用性", with an introduction written by "Elina Rose",
which mention the name of the usability expert "Millicent Marigold".

<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews and
Usability Testing</title>
<content>
...
<part number="1">
<title>Expert Reviews</title>
...
<chapter>
<title>Cognitive Walk-Through</title>
<p>Expert reviewers evaluate Web site
understandability and ease of learning while
performing specified tasks. They walk through
the site answering questions such as "Would a
user know by looking at the screen how to
complete the first step of the task?" and "If
the user completed the first step, would the
user know what to do next?," with the goal of
identifying any obstacles to completing the
task and assessing whether the user would
cognitively be aware that he was successful in
completing a step in the process.</p>
</chapter>
</part>
...
</content>Q3 Nested Distance Query with Wildcards, Stemming, and Thesaurus Support

Find all books on "usability testing" which "quote" "Millicent Marigold" on the value of "iterating" multiple times.

This query finds multiple words in three nested levels of distance queries. It uses wildcards, stemming, and thesaurus support.

Comments: This query combines functionalities introduced in previous sections. This query will return the result shown or no results depending on whether the wildcard or thesaurus match option was processed first. The processing order of these two match options is implementation-defined.

Functionality: phrase query, word queries, character wildcard (suffix) (0 or more), synonyms for "correct" and "guidance" provided by the user ("comment" or "assistance" or "help"), stemming, or query ("correct" or "comment" or "guidance" or "assistance" or "help"), and query ("montana" and "marigold"), unary not query (not "montana" and "marigold"),
unordered window (0 to 70 words within a window of "usability testing" and ("correct" or "comment" or "guidance" or "assistance" or "help"). Ignores content of descendant elements.

<book number="2">
<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<content>
...
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
<p>Users can be tested at any computer
workstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
...
</part>
</content>
</book>
Q5 Query on Different Elements in Different Sub-Trees with Conditional Return

For each book with a title containing the word "usability", a book introduction
containing the word "satisfaction", and a part introduction containing the phrase "identify problems", return the book title and the authors if it has authors. Return the book title and publisher, if it has no authors.

This query finds words and a phrase in different elements in different sub-trees. It also contains a conditional return.

<book number="1">
<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews
and Usability Testing</title>
<author>Millicent Marigold</author>
<author>Montana Marigold</author>
<introduction>
...
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few
errors. Satisfaction with the site is also important.
The user must not only be well-served, but must
feel well-served.</p>
...
</introduction>
<introduction>
<p>Expert reviewers identify problems and recommend changes
to web sites based on research in human computer interaction
and their experience in the field.</p>
...
</introduction>
</book>Use Case "XQUERY-XPATH-COMPOSABILITY": Queries Illustrating Composability of Full-Text with Other XQuery and XPath FunctionalitiesDescription

These queries combine full-text queries with other XQuery and XPath functionalities.

Queries and ResultsQ1 Full-Text Query Constructing New Element

For books with "usability" in the title create a flat list of all title-author pairs, with each pair enclosed in a newly constructed element.

This query finds a word in an element and returns the element and another wrapped in a new element.

Comments: This query finds the word "usability" and stemmed forms of the word "test" in the titles of
book chapters. It returns chapter titles along with an occurrence count of descendant step elements. The query returns a number of steps equal to
0 if the chapter is on usability testing but does not specify any steps (e.g., there are not descendant step elements).

Comments: This query finds the word "usability" in the title of a book, then returns title-author pairs
for those books when there are author elements. If there are no author elements, it returns publisher elements.

<book number="3">
<title shortTitle="Usabilityguy Manuscript
Guide">John Wesley Usabilityguy: A Register of
His Papers</title>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-1999, with the bulk of the items
concentrated in the period from 1985 to 1999. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
</book>Q6 Full-Text Query with Conditional Return of Boolean Values

For each book on "usability" return the book title and a new has-publishers element with value true if the book has more than 1 publisher. Return the title and a new has-publishers element with value false if the book does not have more than one publisher.

This query finds a word, then returns Boolean values based on the number of occurrences of an element.

Comments: This is a full-text query on the phrase "usability testing" using a wildcard on the word "test", restricted to the subject element. The query
counts the number of author elements, and runs a greater than comparison on dates.

Comments: This query returns a book if its last date of
publication is after 2001 and one of its subjects is
the same as a subject of the book with the short title "Usability
Basics". This query uses an XPath expression to dynamically find the
subjects of books.

Comments: This query uses an XQuery expression to determine the number of words in an unordered window. It allows more words in the window when there are more chapters in the book. The query returns "tasks which are critical for users to be able to complete successfully" from Book 2, because there are three chapters in Book 2 which multiplied by four allows up to twelve words within the window.

<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<content>
...
<part number="1">
<chapter>
<title>Planning then Conducting Usability
Tests</title>
<p>Take the following steps to plan usability
testing. <step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to
complete successfully.</step>
<step number="3">Compile a script of questions or
instructions which will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
...
</content>Use Case "SCORE": All Queries May Be Written with Score, Queries in this Section Must Be Written with ScoreDescription

All the queries in these Use Cases may be written with or without score. The Use Cases in this section are merely a small subset that focuses on score.

These queries exploit score and can not be written as queries with pure Boolean full-text predicates. Among these queries are a query that computes and returns only scores, a query which returns only results over a specified threshold, a query which filters by score, a query which returns all the documents ordered, and a query which uses weighting to impact scoring and sorting.

Scoring methodologies are not defined in this recommendation. Scoring is implementation-defined.

Queries and ResultsQ1 Query Returning Scores

Find all books which mention "usability" in the title or the text. Return book titles and scores.

Comments: This query is only possible as a scored query. Scores are included between 0 and 1. The scoring methodology in this use case is for illustrative purposes only. Scoring methodologies will be implementation-defined. This query returns the same results as a query with a pure Boolean full-text predicate. The difference is that the results are scored and the results are returned displaying the score and ranked by score.

Comments: This query returns results only for the two books with the highest scores. This query is only possible as a scored query. The scoring methodology in this use case is for illustrative purposes only. Scoring methodologies will be implementation-defined. This query returns the same results as a query with a pure Boolean full-text predicate. The difference is that the results are scored and through the introduction of a third variable only the two results with the highest scores are returned.

<book number="1">
<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews
and Usability Testing</title>
</book>
<book number="2">
<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
</book>Q3 Query Filtering on Scores

Find all books that focus on "usability".

This query performs a word query and filters on scores.

Operands: "usability"

Functionality: word query, implementation-defined scoring, filters on scores (accepts only those with score over 0.1)

Comments: This query is only possible as a scored query. The scoring methodology in this use case is for illustrative purposes only. Scoring methodologies will be implementation-defined. This query returns the same results as a query with a pure Boolean full-text predicate. The difference is that the results are scored and then filtered on the scores.

<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews
and Usability Testing</title>
<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>Q4 Query Combining Score and XML Structure with a Conditional Return

Find all books with parts about "usability testing".

This query finds books which contain parts about usability testing, returning entire books, but without part elements identified as irrelevant via score.

Comments: This query is only meaningful as a scored query. The scoring methodology in this use case is for illustrative purposes only. Scoring methodologies will be implementation-defined. This query returns the same results as a query with a pure Boolean full-text predicate. The difference is that this query filters the part elements. They are included or excluded from the results depending on their score.

<book number="1">
<metadata>
...
</metadata>
<content>
<introduction>
<author>Elina Rose</author>
<p>The usability of a Web site is how well the
site supports the user in achieving specified
goals. A Web site should facilitate learning,
and enable efficient and effective task
completion, while propagating few errors.
Satisfaction with the site is also important.
The user must not only be well-served, but must
feel well-served.</p>
<p>Expert reviews and usability testing are
methods of identifying problems in layout,
terminology, and navigation before they frustrate
users and drive them away from your site.</p>
<p>The most successful projects employ multiple
methods in multiple iterations. As Millicent
Marigold remarked during a recent conference,
"Don't stop. Iterate, iterate, then iterate
again."</p>
<p>This book has been approved by the Web Site
Users Association.</p>
</introduction>
...
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usabilitytesting.</p>
<p>Users are asked to complete tasks which
measure the success of the information
architecture and navigational elements of the
site.</p>
<p>Then changes are made to improve service to
users.</p>
</chapter>
</part>
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
<p>This book has not been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
<chapter>
<title>Planning then Conducting UsabilityTests</title>
<p>Take the following steps to plan usabilitytesting. <step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
<p>Users can be tested at any computer
workstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usabilitytesting can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
<chapter>
<title>Evaluating and Implementing Results</title>
<p>Compile the results and review collectively.
Make changes to the site to alleviate the problems
found in Web site components which were propagating
the largest number of or the most devastating errors.
Begin new iterations of testing and changes, until
users are successful in the accomplishing the
tasks.</p>
</chapter>
</part>
</content>
</book>Q5 Query Returning All Books Ordered by Score

Return all books, listing books with text on "software" first.

This query performs a word query, returns all the documents in the database, and orders them returning those with found word first, those without last.

Comments: This query is only meaningful as a scored query. The scoring methodology in this use case is for illustrative purposes only. Scoring methodologies will be implementation-defined. This query returns the more results than a parallel query with a pure Boolean full-text predicate. In a parallel query with a pure Boolean full-text predicate, the last result would have a Boolean value of false and would not be returned. In this scored query the last result receives a score and is returned.

<book number="1">
<metadata>
...
</metadata>
<content>
<part number="1">
<title>Expert Reviews</title>
<introduction>
...
<p>Expert review methods should be
initiated early in the development process,
as soon as paper <b>p</b>rototypes
(hand-drawn pictures of Web pages) or
<b>w</b>ireframes (electronic mockups) are
available. They should be conducted using
the hardware and software similar to that
employed by users.</p>
</introduction>
</part>
...
</content>
</book>
<book number="3">
<metadata>
...
</metadata>
<content>
<introduction>
<p>The papers of John Wesley Usabilityguy span the
years 1946-2001, with the bulk of the items
concentrated in the period from 1985 to 2001. The
papers feature his career as a developer of software
applications and usability specialist. The collection
consists of correspondence, memoranda, journals,
speeches, article drafts, book drafts, notes, charts,
graphs, family papers, clippings, printed matter,
photographs, résumés and other materials.</p>
</introduction>
...
</content>
</book>
<book number="2">
<metadata>
...
</metadata>
<content>
...
<content>
</book>Q6 Query with Weight Declaration

<title shortTitle="Improving Web Site Usability">Improving
the Usability of a Web Site Through Expert Reviews
and Usability Testing</title>
<content>
...
<part number="2">
<chapter>
<title>Usability Testing</title>
<p>Once the problems identified by expert
reviews have been corrected, it is time to
conduct some tests of the site with your unique
audience or audiences by conducting usabilitytesting.</p>
<p>Users are asked to complete tasks which
measure the success of the information
architecture and navigational elements of the
site.</p>
<p>Then changes are made to improve service to
users.</p>
</chapter>
</part>
</content>
<title shortTitle="Usability Basics">Usability
Basics: How to Plan for and Conduct Usability Tests
on Web Site Thereby Improving the Usability of Your
Web Site</title>
<content>
<introduction>
<p>This is a basic handbook for planning and
conducting usability tests on Web sites. Usability
testing should be used in conjunction with other
expert review methods.</p>
<p>This book has not been approved by the Web Site
Users Association.</p>
</introduction>
<part number="1">
<chapter>
<title>Planning then Conducting UsabilityTests</title>
<p>Take the following steps to plan usability
testing. <step number="1">Clarify and
articulate the goal of the usability testing.
</step> <step number="2">Identify tasks which
are critical for users to be able to complete
successfully.</step> <step number="3">Compile
a script of questions or instructions which
will prompt the user to attempt those
tasks.</step> <step number="4">Identify your
users and begin recruiting them.</step> <step
number="5">Conduct a pretest on a few users.
</step> <step number="6">Edit the script based
on insights gleaned from the pretest.</step>
<step number="7">Resume testing.</step></p>
</chapter>
</part>
<part number="2">
<chapter>
<title>Conducting Usability Tests</title>
<p>Users can be tested at any computer
workstation <footnote>They may be more
comfortable at their own workstation than in
a lab.</footnote> or in a lab.</p>
<p>Give the user the script, then assure them
that you are testing the Web site, not them.
Users are asked to verbalize their thoughts as
they complete the tasks. The event is recorded
or someone takes notes. It is often preferable
to have two testers, <footnote>Usability
testing can be done at great expense or on a
shoe string, using <testingProcedure>in-house
expertise</testingProcedure> or
<testingProcedure>contracting with human
computer interaction professionals
</testingProcedure>.</footnote> one to ask the
questions, another to take notes. Testers should
offer no guidance or comments to the user. Mouse
movements, typing, expressions, and the user's
words should be recorded.</p>
</chapter>
...
</part>
</content>Acknowledgements

The editors thank the members of the Full Text Task Force of the XML Query and XSL Working Groups, which produced
the material in this document. Special thanks to Stephen Buxton for contributing the first version of the schema.

Moved "with stemming" to after "improve" and added parentheses around ("improve" with stemming ftand "web" ftand "usability") to make the distance operator applicable to all 3 operands in the XQuery and XPath solutions.

Pat Case

2008-07-10

Corrected 5.2.1 Q1 One Character Suffix Wildcard Query

Capitalized the "S" in "Solution in XQuery".

Pat Case

2008-07-10

Corrected 16.2.9 Q9 Query Using an XQuery Expression to Determine the Number of Words Allowed in a Window

Corrected 16.2.9 Q9 Query Using an XQuery Expression to Determine the Number of Words Allowed in a Window

Changed the for statement to a let statement in the XQuery solution. Also changed the ./contents/part/chapter paths in both the XQuery and XPath solutions to eliminate the incorrect contents (should be content) element.

Pat Case

2008-07-16

Corrected 11.2.2 Q2 Query in Any Instance of an Element (Existential Quantification)

Corrected use of $s1 and $s2 variables in the XQuery and XPath solutions.

Pat Case

2008-07-16

Corrected 13.2.3 Q3 Query on Element and Its Ancestors

Camel-cased element names and corrected the paths defining the variables in the XQuery and XPath solutions. Added a 2nd count clause in the XQuery solution. Corrected the Query Context.

Replaced the "." in the ignore path with the $co variable to provide context, added parens around the ftor expressions, changed the ftnot expression to use the XQuery not, restored the expected result to Book 2.

Pat Case

01-12-2010

17.2.6 Q6 Query with Weight Declaration

Added predicate to first let clause to return elements instead of a Boolean, specified descending, made weight greater than 1, added where $booktext clause.