<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>visKWQL, a Visual Renderer for a Semantic Web Query Language</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andreas Hartl</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Klara Weiand</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francois Bry</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Informatics, University of Munich Oettingenstr.</institution>
          <addr-line>67, 80538 Munchen</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Querying a Wiki must be simple enough for beginning users, yet powerful enough to accommodate experienced users. To this end, the keyword-based KiWi query language (KWQL) supports queries ranging from simple lists of keywords to expressive rules for selecting and reshaping Wiki (meta-)data. In this demo, we showcase visKWQL, a visual interface for the KWQL language aimed at supporting users in the query construction process. visKWQL and its editor are described, and their functionality is illustrated using example queries. The editor provides guidance throughout the query construction process through hints, warnings and highlighting of syntactic errors. The editor enables round-tripping between the twin languages KWQL and visKWQL, meaning that users can switch freely between the textual and visual form when constructing or editing a query. It is implemented using HTML, JavaScript, and CSS, and can thus be used in (almost) any web browser without any additional software.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Web query languages like XQuery and SPARQL allow for the precise and
targeted selection and transformation of Web data. While these languages are
powerful tools, they require their users to be knowledgeable about the language itself
as well as the structure and schema of the queried data. This requirement
excludes a large part of the web's user base (and thus the potential user base of
the Semantic Web) from the bene ts of these languages and the functionality
they provide.</p>
      <p>
        Visual languages have two advantages over textual languages that speci cally
bene t beginning users [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]: First, their visual structure can make them easier
to learn and understand than textual languages. Secondly, editors for visual
languages can support users in the creation of valid queries by providing guidance
and preventing editing operations that would result in incorrect queries.
      </p>
      <p>
        This demonstration presents visKWQL1, a visual query interface for the
Semantic Wiki KiWi [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. visKWQL is not so much a separate query language but
1 A detailed demonstration description as well as a demo of visKWQL are available
at http://www.pms.i .lmu.de/visKWQL/
rather a visual rendering of KWQL, the keyword-based KiWi query language.
KWQL [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is a rule-based query language based on the label-keyword paradigm
that combines a low entry barrier with powerful querying and ease of use of
keyword search with advanced features and capabilities as used in traditional
query languages in order to accommodate users with varying levels of expertise.
      </p>
      <p>visKWQL aims at extending textual KWQL|which itself has been designed
to be easy to use|to achieve two cohesive and tightly integrated querying modi
in the KiWi Wiki and enable user-friendly and powerful querying.</p>
      <p>
        The work described here has been presented before as a demonstration at
the 2010 WWW conference [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
2
      </p>
      <p>visKWQL
visKWQL provides a visual alternative to textual KWQL. It fully supports
KWQL in that every KWQL query can be expressed as an equivalent visKWQL
query. Further, in order to avoid introducing additional constructs and thus
additional complexity, visKWQL stays close to the textual language in its visual
representation.
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Visual Formalism</title>
      <p>visKWQL uses a form-based approach, in which all KWQL elements are
represented as boxes, and associations between them are represented as nestings
(see Figure 1 for an example). Boxes consist of a label, in which the name of the
represented KWQL element is included, and a body, which can hold child boxes.</p>
      <p>This approach stays close to KWQL's textual structure, making it easier to
learn visKWQL and to translate between the two representations; it also lends
itself well to rendering in HTML.
2.2</p>
    </sec>
    <sec id="sec-3">
      <title>Round-tripping</title>
      <p>One of the key features of visKWQL is round-tripping, to achieve a tight coupling
between KWQL and visKWQL.</p>
      <p>Whenever the user makes a change to the visual query, the change is
immediately represented in the textual version. The textual query can further be
edited and parsed by the system to display it in its visual form.</p>
      <p>This allows the user to make changes in the representation of his choice at
any time during the query construction process, to import KWQL queries easily
into visKWQL, and has the additional bene t of teaching the user KWQL while
he experiments with the visKWQL editor.
2.3</p>
    </sec>
    <sec id="sec-4">
      <title>User Guidance</title>
      <p>User support in visKWQL is provided via tooltips, error prevention, and error
and problem display and correction.
Tooltips: A text area below the workspace displays an explanation of the KWQL
element represented by the box currently under the mouse cursor.
Error Prevention: A large number of syntactic errors result from invalid box
nestings, and can be actively prevented by the editor during drag and drop
actions. When a box is being dragged, the system continuously checks the validity
of a child inclusion or a type switch with the box underneath it.</p>
      <p>If dropping the box in its current location would result in a syntactic error,
the border of the box underneath it is colored red, and a tooltip informs the user
that he may not drop the box (see Figure 1).</p>
      <p>Error Reporting and Correction: Some errors cannot be prevented during
editing. These include variable names or values containing invalid characters,
empty strings, misplaced operators and references to unde ned variables.</p>
      <p>After every user action, the query is checked for such errors. When an error
is found, the label of the node is colored red and a tooltip indicating the error is
displayed next to it.To make these errors easy to locate within the query, even
if the erroneous node is currently hidden, the labels of all its parent boxes will
also be colored red, and display a tooltip that a child box contains an error.</p>
      <p>Errors that are less severe and can be corrected automatically, like empty
boxes, cause the box label to be colored orange. A tooltip and a message below
the workspace inform the user about the source of the problem.
3</p>
      <p>Acknowledgements
The research leading to these results is part of the project \KiWi - Knowledge
in a Wiki" and has received funding from the European Community's Seventh
Framework Programme (FP7/2007-2013) under grant agreement No. 211932.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>F.</given-names>
            <surname>Bry</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.</given-names>
            <surname>Weiand</surname>
          </string-name>
          .
          <article-title>Flavours of KWQL, a keyword query language for a semantic wiki</article-title>
          .
          <source>In Proceedings of SOFSEM</source>
          <year>2010</year>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>T.</given-names>
            <surname>Catarci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Costabile</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Leviladi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Batini</surname>
          </string-name>
          .
          <article-title>Visual Query Systems for Databases: A Survey</article-title>
          .
          <source>Journal of Visual Languages and Computing</source>
          ,
          <volume>8</volume>
          (
          <issue>2</issue>
          ),
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>A.</given-names>
            <surname>Hartl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. A.</given-names>
            <surname>Weiand</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Bry</surname>
          </string-name>
          . visKWQL,
          <article-title>a visual renderer for a semantic web query language</article-title>
          .
          <source>In WWW</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. S. Scha ert, J. Eder, S. Grunwald, T. Kurz, and
          <string-name>
            <given-names>M.</given-names>
            <surname>Radulescu</surname>
          </string-name>
          .
          <article-title>Kiwi - a platform for semantic social software</article-title>
          .
          <source>In ESWC</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>