[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XML-QL (was Re: Whence XQL?) (Ok Whither XQL, Dave)

  • From: Ed Howland <Ed@d...>
  • To: "'xml-dev@i...'" <xml-dev@i...>
  • Date: Thu, 25 Mar 1999 11:01:41 -0800

xql syntax
I took a deeper look at XML-QL and at first glance, it appears to be a
stronger syntax. I'm happy that AT&T chose Java to implement a prototype
implementation. I'm hoping I can embed the engine in my Java code.

The XQL syntax is rather cryptic, but familiar to XSL writers, and seems to
have the benefit of being embeddable. The XQL authors chose to leave source
and destination streams and formats up to implementers. These two things
appealed to me initially. I could embed an XQL engine in a Java servlet and
send it querys from ECMAScript. Internally, it makes a DOM tree which could
be transformed via XSL before being returned to the browser. Since all of
these pieces were in Java it seemed a powerful combination. (I know that
some things can be done in XSL, but I needed some of the extensions that XQL
provided.)

BTW, how do you get at the XQL part of IE5? I never saw that in MS's
writeup. Or is it just extensions to their XSL?

In the meantime, while looking at XML-QL for our short term needs, I'll
continue to work on XQL using Java and ANTLR. For now that is taking two
concurrant directions: The full XQL ANTLR grammer will proceed as usual
producing, eventually a parser that while it recognizes valid XQL, does
nothing more than genrate a abstract syntax tree. The other direction is to
generate a valid subset that actually parses, works on an internal DOM tree
genreated via XML4J, and outputs XML. The first cut of this will only do
path expressions of the form:

	element/*/sub-element//leaf-element

Ed

P.S. I found it funny that Roger's example data closely matches my own. Onw
wonders...

Ed Howland
ed@d...
http://www.dega.com 
"As your attorney, I advise you to take some adrenalchrome"

-----Original Message-----
From: Roger L. Costello [mailto:costello@m...]
Sent: Thursday, March 25, 1999 5:48 AM
To: Matthew Sergeant (EML)
Cc: 'xml-dev@i...'; 'xsl-list@m...';
mff@r...
Subject: XML-QL (was Re: Whence XQL?)


Matthew Sergeant (EML) wrote:
> 
> My problem with XML-QL was their use of tag minimisation (their
proprietary
> </> syntax) means you can't parse XML-QL with an XML parser. That's
foolish
> IMHO - if you're practically using XML already, why not reap the benefits?

Hi Matt,

Not sure that you could do all the things that XML-QL allows you to do
if you stick to the XML syntax.  Example, query the following XML
document for all part names:

<?xml version="1.0"?>
<!DOCTYPE Parts [
<!ELEMENT Parts (part+)>
<!ELEMENT part (name, brand, part*)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT brand (#PCDATA)>
]>
<Parts>
        <part>
                <name>Green Power Juicer</name>
                <brand>Green Power</brand>
        </part>
        <part>
                <name>Toyota Tercel</name>
                <brand>Toyota</brand>
                <part>
                     <name>Sony Stereo X11-3</name>
                     <brand>Sony</brand>
                </part>
        </part>
</Parts>

Note the recursive definition of the part element.  Thus, the part name
can be at any nesting level.  Here's how to do it using XML-QL:

function AllPartNamesQuery () {

// Source: Parts.xml
// Find the names of all the parts

construct  <name>$name</name>
where      <Parts>
               <part*>
                   <name>$name</name>
               </>
           </Parts> IN "Parts.xml"
}

How would you do this using XML syntax?  /Roger


> 
> Anyway, there's an implementation of XML-QL in my directory on CPAN for
perl
> users, which needs fixing up a little bit, but it's quite usable (if a
> little slow). It facilitates the use of perl's regexp syntax for queries
as
> well as the system used by XML-QL, which makes it nice and powerful...
> 
> Matt.
> --
> http://come.to/fastnet
> Perl on Win32, PerlScript, ASP, Database, XML
> GCS(GAT) d+ s:+ a-- C++ UL++>UL+++$ P++++$ E- W+++ N++ w--@$ O- M-- !V
> !PS !PE Y+ PGP- t+ 5 R tv+ X++ b+ DI++ D G-- e++ h--->z+++ R+++
> 
> > -----Original Message-----
> > From: Roger L. Costello [SMTP:costello@m...]
> > Sent: Thursday, March 25, 1999 11:58 AM
> > To:   Ed Howland
> > Cc:   'xml-dev@i...'; 'xsl-list@m...'
> > Subject:      Re: Whence XQL?
> >
> > Have you looked at XML-QL?  I have been playing around with this XML
> > query tool for a few weeks.  It's quite nice.  It allows you to specify
> > the grammer of extracted data, query multiple XML documents, etc.  See:
> > <http://www.research.att.com/sw/tools/xmlql>  /Roger
> >
> >


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.