OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

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

Re: XML Encoding of XPath: Examples



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
------------------------------------------------------------------------