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

RE: xPath 2.0, XSLT 2.0 ... size increase over v1.0


RE:  xPath 2.0


On Wed, 11 Jun 2003, Michael Kay wrote:

> XSLT/XPath is closed with respect to its own data model. I don't know
> how XSLT's data model relates to a "regular tree language", and I'm not
> familiar with notations such as (a^n b^n).
>
> Is there any chance you could translate this into XML terminology for
> us?

You are right that these are about sequences. I will try to do that below.
a^n b^n means:

a is <a/>
b is <b/>

a^n means sequence of any number of <a/>

a^n b^n means sequence of any number of <a/> followed by sequence of the
*same* number of <b/>

The sequences which conform to this are:

empty sequence, <a/><b/>, <a/><a/> <b/><b/> ... etc

You cannot write an XML schema/regular tree grammar for this output..

In my example, when I say S -> s (A, S, B) can be read as

<!ELEMENT a (a, s, b)>

S -> s (A, S, B) | s () can be read as

<!ELEMENT s (a, s, b)?>

A -> a () can be read as

<!ELEMENT a EMPTY>

cheers and regards - murali.

> The examples seem to suggest that your concerns are with queries that
> generate a sequence of nodes rather than a single node. Sequences are
> part of the data model, and the language is closed over this space.
>
> Michael Kay
>
> >
> > I have seen two kinds of operations under which regular tree
> > languages are not closed.. that is the result is not a
> > regular tree language..
> >
> > (a) Consider the schema:
> > S -> s (A, S, B) | s ()
> > A -> a ()
> > B -> b ()
> >
> > if we write a query like // (a | b) -- the result is (a^n
> > b^n) which is not regular tree language..
> >
> > (b) Consider
> > S -> s (A*)
> > A -> a ()
> >
> > consider the query
> > for $x in //a
> >    return <b/>
> > for $x in //a
> >    return <c/>
> >
> > the result is (b^n c^n)
> >
> > The question is has the new constructs in XPath made it not
> > closed or not.. It might have.. If someone has studied these
> > aspects, then we can know if XPath 2.0 is different from
> > XPath 1.0 in these respects also..
> >
> > cheers and regards - murali.


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.