You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vg...@apache.org on 2004/03/13 14:47:04 UTC

cvs commit: xml-xindice/src/documentation/content/xdocs/1.0 guide-user.xml

vgritsenko    2004/03/13 05:47:04

  Modified:    src/documentation/content/xdocs guide-user.xml
               src/documentation/content/xdocs/1.0 guide-user.xml
  Log:
  NodeSource -> Query for 1.1 docs. Some indenting.
  
  Revision  Changes    Path
  1.13      +27 -28    xml-xindice/src/documentation/content/xdocs/guide-user.xml
  
  Index: guide-user.xml
  ===================================================================
  RCS file: /home/cvs/xml-xindice/src/documentation/content/xdocs/guide-user.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- guide-user.xml	25 Feb 2004 13:38:03 -0000	1.12
  +++ guide-user.xml	13 Mar 2004 13:47:04 -0000	1.13
  @@ -394,42 +394,41 @@
               <p>
                  To make it easy to link the result node back to the originating
                  document, Xindice adds a few attributes to the result. These attributes
  -               are added in the NodeSource namespace that has the URI
  -               http://xml.apache.org/xindice/NodeSource. The
  -               <code>col</code> attribute specifies the
  -               collection where the document can be found and the
  -               <code>key</code> attribute
  +               are added in the Query namespace that has the URI
  +               <code>http://xml.apache.org/xindice/Query</code>. The
  +               <code>col</code> attribute specifies the collection where the document
  +               can be found and the <code>key</code> attribute
                  provides the key of the original document. Using this information it
                  is possible to retrieve the original document that this node was
                  selected from for further processing.
               </p>
               <source><![CDATA[
  -<product product_id="120320"
  -         xmlns:src="http://xml.apache.org/xindice/NodeSource"
  -         src:col="/db/data/products" src:key="120320">
  -  <description>Glazed Ham</description>
  -</product>
  +  <product product_id="120320"
  +           xmlns:src="http://xml.apache.org/xindice/Query"
  +           src:col="/db/data/products" src:key="120320">
  +    <description>Glazed Ham</description>
  +  </product>
               ]]></source>
               <p>
                  If more then one result is found the results look something like
                  this. This could be the result of the query /product
               </p>
               <source><![CDATA[
  -<product product_id="120320"
  -         xmlns:src="http://xml.apache.org/xindice/NodeSource"
  -         src:col="/db/data/products" src:key="120320">
  -  <description>Glazed Ham</description>
  -</product>
  -<product product_id="120321"
  -         xmlns:src="http://xml.apache.org/xindice/NodeSource"
  -         src:col="/db/data/products" src:key="120321">
  -  <description>Boiled Ham</description>
  -</product>
  -<product product_id="120322"
  -         xmlns:src="http://xml.apache.org/xindice/NodeSource"
  -         src:col="/db/data/products" src:key="120322">
  -  <description>Honey Ham</description>
  -</product>
  +  <product product_id="120320"
  +           xmlns:src="http://xml.apache.org/xindice/Query"
  +           src:col="/db/data/products" src:key="120320">
  +    <description>Glazed Ham</description>
  +  </product>
  +  <product product_id="120321"
  +           xmlns:src="http://xml.apache.org/xindice/Query"
  +           src:col="/db/data/products" src:key="120321">
  +    <description>Boiled Ham</description>
  +  </product>
  +  <product product_id="120322"
  +           xmlns:src="http://xml.apache.org/xindice/Query"
  +           src:col="/db/data/products" src:key="120322">
  +    <description>Honey Ham</description>
  +  </product>
               ]]></source>
            </section>
            <p>
  
  
  
  1.3       +34 -30    xml-xindice/src/documentation/content/xdocs/1.0/guide-user.xml
  
  Index: guide-user.xml
  ===================================================================
  RCS file: /home/cvs/xml-xindice/src/documentation/content/xdocs/1.0/guide-user.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- guide-user.xml	8 Feb 2004 04:03:15 -0000	1.2
  +++ guide-user.xml	13 Mar 2004 13:47:04 -0000	1.3
  @@ -340,8 +340,8 @@
                     </section>
               </section>
               <section>
  -                  <title>Querying the Database</title>
  -                  <p>
  +      <title>Querying the Database</title>
  +      <p>
            Xindice currently supports XPath as a query language. In many
            applications XPath is only applied at the document level but in
            Xindice XPath queries can be executed at either the document level
  @@ -354,37 +354,37 @@
            to the <link href="guide-administrator.html">Administrators
            Guide</link> for more detail about configuring indexes.
         </p>
  -                  <p>
  +      <p>
            You can execute XPath queries against the database using the command
            line tools and the result of the query will be displayed.
         </p>
  -                  <section>
  -                        <title>
  +      <section>
  +         <title>
               Executing an XPath query against a collection of XML documents
            </title>
  -                        <p>
  +         <p>
               Here we assume we have a collection /db/data/products that contains
               documents that are similar to the following.
            </p>
  -                        <source><![CDATA[<?xml version="1.0"?>
  +         <source><![CDATA[<?xml version="1.0"?>
   <product product_id="120320">
      <description>Glazed Ham</description>
   </product>]]></source>
  -                        <p>
  +         <p>
               The XPath /product[@product_id="120320"] will be executed against
               the collection /db/data/products and all matching product entries
               will be returned.
            </p>
  -                        <source><![CDATA[
  +         <source><![CDATA[
   xindice xpath_query -c /db/data/products -q /product[@product_id="120320"]
            ]]></source>
  -                        <p>
  +         <p>
               The result of the query is an XPath node-set that contains one
               node for each result. In this particular example there is only
               one result and the node that matches is the root element so you
               get back basically the whole document.
            </p>
  -                        <p>
  +         <p>
               To make it easy to link the result node back to the originating
               document, Xindice adds a few attributes to the result. These attributes
               are added in the NodeSource namespace that has the URI
  @@ -396,15 +396,17 @@
               is possible to retrieve the original document that this node was
               selected from for further processing.
            </p>
  -                        <source><![CDATA[<product product_id="120320" xmlns:src="http://xml.apache.org/xindice/NodeSource"
  +        <source><![CDATA[
  +<product product_id="120320" xmlns:src="http://xml.apache.org/xindice/NodeSource"
         src:col="/db/data/products" src:key="120320">
      <description>Glazed Ham</description>
  -</product>]]></source>
  -                        <p>
  -            If more then one result is found the results look something like
  -            this. This could be the result of the query /product
  -         </p>
  -                        <source><![CDATA[
  +</product>
  +        ]]></source>
  +        <p>
  +          If more then one result is found the results look something like
  +          this. This could be the result of the query /product
  +        </p>
  +        <source><![CDATA[
   <product product_id="120320" xmlns:src="http://xml.apache.org/xindice/NodeSource"
         src:col="/db/data/products" src:key="120320">
      <description>Glazed Ham</description>
  @@ -416,14 +418,16 @@
   <product product_id="120322" xmlns:src="http://xml.apache.org/xindice/NodeSource"
         src:col="/db/data/products" src:key="120322">
      <description>Honey Ham</description>
  -</product>]]></source>
  -                  </section>
  -                  <p>
  -         While it is certainly useful to be able to query from the command
  -         line it is  probably more useful to be able to use the results of a
  -         query in an application. For more information on building
  -         applications for Xindice, please refer to the <link href="guide-user.html">Developers Guide</link>.
  +</product>
  +        ]]></source>
  +      </section>
  +      <p>
  +        While it is certainly useful to be able to query from the command
  +        line it is  probably more useful to be able to use the results of a
  +        query in an application. For more information on building
  +        applications for Xindice, please refer to the
  +        <link href="guide-user.html">Developers Guide</link>.
         </p>
  -            </section>
  -      </body>
  +    </section>
  +  </body>
   </document>