[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XPath....



A XPath package...
---
http://www.246.ne.jp/~kamiya/pub/XPath4XT.html
Title:
About XPath interface for XT Version 0.92.3
===========================================
                                                                     2000/08/02
                                                                  Takuki Kamiya
                                                                Fujitsu Limited

1. Overview
-----------

  XPath interface for XT provides for DOM query API facifities on top of XT.
  It is implemented in Java language and complies with W3C's XPath Proposed
  Recommendation as is currently implemented in XT.

  For detailed information about XT and XPath, refer to the following URLs.

  XPath: http://www.w3.org/TR/xpath
  XT: http://www.jclark.com/xml/xt.html


2. Download
-----------

  http://www.246.ne.jp/~kamiya/pub/omquery.zip


3. New Features in this release
-------------------------------

  Default namespace if there is one specified has been made effective for
  element type names in XPath expressions.


4. Contents of archive
----------------------

  omquery --- javadoc/ (API Documentation)
           |
           -- com/ (source code)
           |
           -- sample/ (sample programs)
           |
           -- copying.txt (XT's copyright document)
           |
           -- omquery.jar (XPath interface for XT)
           |
           -- xtdash.jar (slightly modified version of XT)
           |
           -- README.txt (This file)


5. Usage
--------

  To use XPath interface for XT Version 0.92.3, follow the steps listed below.

  A. Build a DOM Tree (i.e. org.w3c.dom.Document) by using a JAXP-compliant
     XML parser.
  B. Construct a DomQueryManager object with the DOM created in step A.
  C. Create a XPathContext using one of DomQueryManager.createXPathContext(...)
     methods.
  D. Setup that XPathContext with appropriate evaluation context information.
  E. Invoke DomQueryManager's get*ByXPath (e.g. getNodesByXPath) method by
     supplying XPath selector string and XPathContext as arguments.

  For example, if your parser is compliant to JAXP 1.0, the code fragment
  below illustrates how to use the API.

  >  System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
  >                     "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
  >
  >  InputSource input = new InputSource(createURL("sample.xml"));
  >  XMLProcessorImpl xmlproc = new JAXP_ProcessorImpl();
  >  org.w3c.dom.Document doc = xmlproc.load(input);
  >
  >  DomQueryMgr query_mgr = new DomQueryMgr(doc);
  >
  >  XPathContext ctx = query_mgr.createXPathContext();
  >
  >  ctx.setDomNode(doc);
  >  ctx.addNumberVariable("a", 1.0);
  >
  >  Enumeration iter = query_mgr.getNodesByXPath("(A/B/C)[2]", ctx);

  Please refer to API documentation and sample programs for more details.
  XPath interface for XT Version 0.92.3 has been packaged as "omquery.jar".


6. Dependencies on other software
---------------------------------

  XPath interface for XT Version requires XT to be present in the class path.
  For version 0.92.3, however, you need to use the variant of XT (xtdash.jar)
  which accompanies this software. In xtdash.jar, a few classes and fields
  have been made to be public, otherwise it is almost identical to the original
  XT (version 19991105).

  You need to comply with XT's license statement with regard to the disposition
  of the xtdash.jar file. XT's license statement is incorporated as the file
  named copyright.txt.

  Version 0.92.3 also currently assumes that you are using JAXP 1.0 XML parser.
  You should be able to add support for other XML parser easily by
  subclassing XMLProcessorImpl abstract class. XML Parser itself is not included
  in this distribution.

  For information on JAXP 1.0 implementations, visit to the following pages.

  Xerces implementation: http://xml.apache.org/xerces-j/
  Sun implementation: http://java.sun.com/xml/download.html

  As of today, Xerces-J is able to support JAXP 1.0, however, you have to
  download and compile the org.apache.xerces.jaxp package to enable JAXP 1.0
  for Xerces-J 1.0.3 distribution binary. Next release of Xerces-J is expected
  to incorporate that package by default.


7. Licence policy
-----------------

  Copyright (c) 1999,2000 FUJITSU LIMITED

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the ``Software''),
  to deal in the Software without restriction, including without limitation the
  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  sell copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included
  in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY CLAIM, DAMAGES OR
  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  OTHER DEALINGS IN THE SOFTWARE.

8. Contact Information
----------------------

  If you have any comments relating to this software, please send them to
  kamiya@sysrap.cs.fujitsu.co.jp.