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

Re: XML Encoding of XPath: Examples

  • From: Eric van der Vlist <vdv@d...>
  • To: xml-dev@l...
  • Date: Fri, 16 Mar 2001 13:42:21 +0100

xpath samples
Evan Lenz wrote:
> 
> Wayne Steele wrote:
> > Eric van der Vlist wrote:
> > >Having used HP polish notation a lot in my early days, I would have
> > >thought of an XPath expression as a stack and would have embedded the
> > >location steps instead of keeping them at the same level...
> >
> > That was my original thought.
> > Modeling Location Steps as functions, and using a prefix notation.
> > I ended up with something like
> >    child::foo/attribute::bar
> > looking like
> >    <attribute name="bar">
> >       <child name="foo">
> >          <contextNode />
> >       </child>
> >    </attribute>
> 
> How interesting. I don't know exactly what Eric had in mind, but I was
> thinking that the containment would work the other way around.

I would have also taken it the other way round, but this way may be
worth considering as well !

> Instead of the above, you'd have something like:
> 
> <child name="foo">
>    <attribute name="bar"/>
> </child>
> 
> Eric, is this the kind of containment you had in mind?

Yes.

> I haven't worked out the implications of doing this, but it would feel more
> natural and look more familiar to users of, say, TREX.

Yes, I hadn't expected it, but this is interesting to explore.

I find it amazing that this syntax that is a straight reformulation of
XPath shows similarities between TREX (rules expressed in a XML syntax)
and Schematron (rules expressed in XPath syntax) that were hidden before
by the different syntax...

Anyone willing to try a XSLT transformation to convert TREX in
Schematron ?

Eric
 -- 
Rendez-vous à Paris pour net2001.
                         http://www.mynet2001.net/pgmonline2001/it2.html
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------

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.