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

Ed Howland Ed at dega.com
Thu Mar 25 19:02:41 GMT 1999


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 at dega.com
http://www.dega.com 
"As your attorney, I advise you to take some adrenalchrome"

-----Original Message-----
From: Roger L. Costello [mailto:costello at mitre.org]
Sent: Thursday, March 25, 1999 5:48 AM
To: Matthew Sergeant (EML)
Cc: 'xml-dev at ic.ac.uk'; 'xsl-list at mulberrytech.com';
mff at research.att.com
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 at mitre.org]
> > Sent: Thursday, March 25, 1999 11:58 AM
> > To:   Ed Howland
> > Cc:   'xml-dev at ic.ac.uk'; 'xsl-list at mulberrytech.com'
> > 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 at ic.ac.uk
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 at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
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 at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list